[Gimp-user] Large XCF filesize



Hi there,

I've recently created an XCF template file that almost only contains
large slabs of solid colors (i.e., no "picture"), couple of layers and
layer masks. I was surprised to find that the XCF compressed this rather
poorly, even though this should be an ideal case for lossless compression.

In an attempt to reduce the file size, I cropped one of the layers
("Bildrahmen") which was originally the entire image size, to only the
visible area using Layer -> Crop to Content. I would have expected that
this definitely reduces the size since it needs to compress less pixels
and stores a fixed layer offet. To my surprise, the XCF filesize even
increased. I.e., with the full layer it's 1139339 bytes (2.8
compression) and with the cropped layer it jumps to 1156758 bytes long.
Note that when using 2.10 compression, this effect is reversed (i.e., as
you'd expect it to behave).

Considering that layer masks usually contain large slabs of "all white"
or "all black" pixels, shouldn't XCF be able to compress these rather
well, i.e., be optimized for this? I'm quite curious as to what the
reason for the large filesize is.

Also note that when I gzip the XCF, it compresses by a factor of 1:10,
i.e., from about 1 MB down to about 105 kB, which seems much more
reasonable.

If you have insights to this, I'd be happy to learn what's going on there.

All the best,
Johannes


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]