GNOME Bugzilla – Bug 777566
Add support for exporting monochrome PCX files
Last modified: 2017-06-06 22:18:57 UTC
Hi. I used GIMP'S eraser on Windows 7 SP1 to erase pcx files (monochrome) & erasing them led to decrease size of file after export them to pcx format. But I noticed that use of eraser to erase on Linux will increase size of resulted file from export (overwrite) option !!! I used indexed mode of image. I'm on Fedora 24 X64 bit Cinnamon edition. Best.
Can you provide a sample file and/or a description of how to reproduce the issue?
Hi. I'm very sorry for this delay, but I was investigating this issue carefully. After your replay I discovered that NOT all .pcx files suffer from this issue !! For example on .pcx files that not affected by this issue are .pcx files generated by Xsane-GIMP plugin ! All .pcx files produced by scanning processes achieved by GIMP via this plugin not suffered from this issue. In fact their sizes become smaller & smaller with each erasing ...... . But on other hands many .pcx files generated by other utilities (on Windows & Linux) suffer from this issue. I attached 2 example images suffer from this phenomenon: 1st image, I named it "before", is generated by Skanlite on Linux Fedora 24 X64 bit Cinnamon edition. It's size is 112.3 kb 2nd image, I named it "after", is same image but after I edit it by eraser of GIMP. I opened it by GIMP, select eraser, increased size of eraser, erased, then overwrite it. Look for it's size: 421.8 kb !!!
Created attachment 348267 [details] before
Created attachment 348268 [details] after
Why is this filed as a bug at all? Where does it say "files always become smaller by erasing"? How does PCX encode pixels at all?
I get roughly the same size increase on the Windows platform when doing any erasing, so it is at least not platform-specific.
And a blank white file of these dimensions results in a 380kB file. I guess GIMP simply doesn't do much compression to PCX files. Patches to improve that are welcome.
Why this bug still lebialed as "Need info" as long as you confirm that "GIMP does not do much compression to PCX files & patches to improve that are welcome." ?
I guess we simply forgot after you attached the images. Thanks!
When I re-save your before.pcx without changing any pixel, I end up with a file exactly as large as your before.pcx. Your before.pxc is a monochrome PCX with exactly two colors, GIMP can load it, but can only save 8-bit indexed PCX files.
This is actually a duplicate. *** This bug has been marked as a duplicate of bug 159947 ***