3 ms·
It is also crazy to me that so many image formats have such small size caps. I understand not wanting to use extra space for small images, but I can't think of
by adgjlsfhk1 4y ago
It is also crazy to me that so many image formats have such small size caps. I understand not wanting to use extra space for small images, but I can't think of any reason to have a maximum image size smaller than your maximum hard drive size. You probably don't want to unconditionally store 8 bytes for width and height, but you could pretty easily make it only use 1 byte for small images and for anything big, you won't miss the extra 6 bytes.
- gyan 4y agoIt may have to do with limitations of allocating memory chunks on 32-bit machines when these formats were originally designed. The decoder allocates a contiguous buffer that can hold the whole image.
- chungy 4y agoWebP is recent enough that it shouldn't have even been a real concern. 16383×16383 even in 2010 was an absurdly small size. I've had PNGs and JPEGs with larger dimensions for longer than WebP has even existed.
- gfxgirl 4y agoMy guess the limits are because, WebP is based on WebM (video) I agree those limits are too small.
- chungy 4y agoWebP's lossy codec is based on VP8 intraframes; the lossless codec is original. Either mode of which is contained in a RIFF file, which is where the dimension limits happen (RIFF's headers have enough space to represent 2^14-1). WebM is, strictly speaking, a container format that is a subset of Matroska. It doesn't have any real relation to WebP.
- sitkack 4y agoOne solution would be to hold multiple images inside of another wrapper container like zip. The client code would have to handle stitching them together.