Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exported png files get about 100 times larger than expected
#1
Lightbulb 
Hi.

Ok, so first - trying to upload the xcf file failed because of file size, so the only file possible to upload correctly is this png export settings.

Here is the file description.
  • Layer 1 - importet PNG file, file size about 55kB
  • Layer 2 - same dimension and roughly same size, but not same image.
  • Layer 3 - New transparent layer.
  • The layer 3 mainly consists of small spots of non-transparent pixels created with clone tool, so it's just to add/remove some features of a map.
The problem is that after exporting this image file to png format, the resulting file size get over 6MB - that is about 100 times larger, I expected the output png file to be maybe around 70kB at maximum.


Edit : Solved while edit this post

Ok, just figured the solution. The image precision was set to 32 bit floating point, and by converting to 8 bit integer, the exported PNG file became a nice 77kB file.

I post this anyway in case somebody happens to stumble upon same issue.


Attached Files Image(s)
   
Reply
#2
If you are using any image precision higher than 8-bit, the export PNG is 16bpc by default.

However you would expect this to only double the size of the PNG. But the PNG compression can only compress neighboring pixels of the exact same channel value, and with 16-bit or floating point the probability that these are equal is somewhat smaller so high precision images aren't as much compressed.
Reply


Forum Jump: