Closed pengfei666 closed 6 years ago
Assume we have several images, we put them into one binary file. How we put them? Compress images separately then combine them into a single binary file, or combine them into a single binary file first, then compress the whole binary file?
How we put the binary file decide us how to decode the texture file.
Thank you!
The original intent was to compress images individually. I don't think there is much to be gained to compress them again. Maybe one of the current maintainers can comment?
Hey Pengfei, Combining multiple images into a single binary file is not supported by all clients, so we recommend against using this feature of the i3s spec. Also textures are usually large resources so there is not much to gain from combining them. If you have many small textures, you should consider combining them into a texture atlas.
To answer your question, the offset and length fields are before gzip compression. So for uncompressed image data (eg. S3TC textures), you would combine them in a binary file and then compress them. For compressed formats, like JPEG or PNG, as @thorsten-reitz said you would not use gzip compression at all , so you would just combine the images.
@sreinhard Thank you very much. As you say
the offset and length fields are before gzip compression.
I think the length should be uncompressed size even if we only have one dds image. Isn't it?
For showing the question clearly, I paste a screenshot of one data.
Strangely, the length is same as the binary file length. When I uncompressed the binary file, the uncompressed data length doesn't equal file length.
The data can be consumed by ArcGIS PRO. So I want to know how to deal with it?
If the length is compressed length, I am afraid that if we combine S3TC textures into one compressed binary file, then we can't split them correctly.
Oh. Should thank @thorsten-reitz too.
Hi Folks, I have a question about this Part https://github.com/Esri/i3s-spec/blob/a22e94d8bcf484f106f0231baa01793a58959741/format/Indexed%203d%20Scene%20Layer%20Format%20Specification.md#class-image.
As we know, the texture images often are compressed. So here we give a byteOffset and Length fields, the numbers should before compressed or after?