Re: Size on disk vs size reported on status bar

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

 



 Hi,

On Tue, Oct 3, 2017 at 7:17 PM, Elle Stone
<ellestone@xxxxxxxxxxxxxxxxxxxx> wrote:
> I was curious about the disparity in reported size between the size on disk
> in a file manager, and the size reported by "%m". I'm guessing "%m" is the
> size in memory?
>
> For example, I have a GIMP 2.9 XCF that is 4000 x 6000 pixels, 7 layers.
> It's the early stages of a drawing, with very little information on the
> various layers, just the main outlines, some guidelines and a merged layer
> in shades of gray.
>
> The size of the XCF file on disk is 11.5 MiB as measured by the Dolphin file
> manager. When I open the XCF file in GIMP, the size shown in the status bar
> is 3.8 GB.

I don't know how this info is computed in GIMP code (i.e. does it
check for actual memory size or does it do some basic maths as I am
about to do), but assuming your image is 8 bits per channel, and all 7
layers are the size of the image and have no alpha, that makes:
4000*6000*7*24 = 4 032 000 000 / 1024^3 ~ 3.8GB! :-)

> Why such a huge difference in reported size?

Basically in memory, we don't compress. It doesn't matter if your
image were even full unicolor (which could compress perfectly and
could result in a file of a few bytes in any compressed format even if
the image was billions of pixels). As such, every bytes is fully
repeated in memory, even if it were the same.

Jehan

> _______________________________________________
> gimp-developer-list mailing list
> List address:    gimp-developer-list@xxxxxxxxx
> List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
> List archives:   https://mail.gnome.org/archives/gimp-developer-list



-- 
ZeMarmot open animation film
http://film.zemarmot.net
Patreon: https://patreon.com/zemarmot
Tipeee: https://www.tipeee.com/zemarmot
_______________________________________________
gimp-developer-list mailing list
List address:    gimp-developer-list@xxxxxxxxx
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list



[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux