Is there a configuration option somewhere to have KSnapshot save .png images in 8-bit instead of 24-bit? 24-bit is a complete waste for desktop and window screenshots that include no photographs. I know many many moons ago, probably at least a decade, .png file sizes were much much smaller by default. Clicking the KSnapshot help button produces nothing but an hourglass.
On 09/01/2018 12:56 PM, Felix Miata wrote:
Is there a configuration option somewhere to have KSnapshot save .png images in 8-bit instead of 24-bit? 24-bit is a complete waste for desktop and window screenshots that include no photographs. I know many many moons ago, probably at least a decade, .png file sizes were much much smaller by default. Clicking the KSnapshot help button produces nothing but an hourglass.
Felix,
Just use Alt+F2 "khelpcenter"
Then khelpcenter will load fine with all the application help files. (somebody has messed up the khelpcenter path in kdebase (or kdelibs), I can't remember at the moment where that path is hardcoded -- but it is)
Take a look:
http://paste.opensuse.org/46335670
Unfortunately, I don't believe there is a color-depth setting for ksnapshot. ImageMagick can reduce the color-depth on the fly.
I didn't find any option in the executable options either, e.g.
$ ksnapshot --help-all Usage: ksnapshot [Qt-options] [KDE-options] [options]
KDE Screenshot Utility
<snip> --visual TrueColor forces the application to use a TrueColor visual on an 8-bit display <snip> (not what you wanted)
Also, there is a pngquant project on github that does just what you need very well. (don't forget to download both pngquant and the lib folder, for libpngquant sources) before building. It does a fantastic job. You can clone the pngquant repo and then I just clicked on the lib@7dd2 folder and then downloaded the .zip into the original lib dir for pngquant, then it's just a:
./configure make
Which produces the pngquant executable (that I then just copied to /usr/local/bin temporarily. Then
$ pngquant 256 < khelpcenter.png > khelpcenter256.png
For example the posted image on paste.opensuse.org is reduced from:
-rw-r--r-- 1 david david 228711 Sep 3 03:35 khelpcenter.png -rw-r--r-- 1 david david 64774 Sep 3 04:04 khelpcenter256.png
with NO discernible appearance!! Wohoo -- that's cool.
Otherwise, use imagemagick, but the results are not as impressive:
$ convert khelpcenter.png -colors 256 PNG8:khelpcenter256im.png
-rw-r--r-- 1 david david 138971 Sep 3 04:10 khelpcenter256im.png
I'll definitely be building pngquant in my home repo for suse when I get a few minutes to write out a .spec.
On 09/03/2018 04:16 AM, David C. Rankin wrote:
I'll definitely be building pngquant in my home repo for suse when I get a few minutes to write out a .spec.
Sorry, forgot the links:
For pngquat/libpngquant
https://github.com/kornelski/pngquant
https://github.com/ImageOptim/libimagequant/tree/7dd212a6fb890037dc22ac848a9...
and for where I got the info:
https://stackoverflow.com/questions/14031965/convert-32-bit-png-to-8-bit-png...
David C. Rankin composed on 2018-09-03 04:16 (UTC-0500):
Felix Miata wrote:
Is there a configuration option somewhere to have KSnapshot save .png images in 8-bit instead of 24-bit? 24-bit is a complete waste for desktop and window screenshots that include no photographs. I know many many moons ago, probably at least a decade, .png file sizes were much much smaller by default. Clicking the KSnapshot help button produces nothing but an hourglass.
Just use Alt+F2 "khelpcenter"
Then khelpcenter will load fine with all the application help files. (somebody has messed up the khelpcenter path in kdebase (or kdelibs), I can't remember at the moment where that path is hardcoded -- but it is)
Take a look:
What I get: $ lr -gGS dtT* -rw-rw-r-- 1 83696 Sep 3 05:43 dtTst-im.png convert -256 http://fm.no-ip.com/SS/dtTst-im.gif -rw-rw-r-- 1 83696 Sep 3 05:43 dtTst-im8.png convert -256 PNG8: http://fm.no-ip.com/SS/dtTst-im8.png -rw-rw-r-- 1 92696 Sep 3 05:42 dtTst-opng.png optipng http://fm.no-ip.com/SS/dtTst-opng.png -rw-rw-r-- 1 97246 Sep 3 05:42 dtTst-im.gif convert http://fm.no-ip.com/SS/dtTst-im.gif -rw-rw-r-- 1 113879 Sep 3 05:41 dtTstO.png original http://fm.no-ip.com/SS/dtTstO.png
I'll definitely be building pngquant in my home repo for suse when I get a few minutes to write out a .spec.
Please let me know when done. Building is not something I can deal with. BS rpms I can. :-)
On 09/03/2018 05:16 AM, Felix Miata wrote:
I'll definitely be building pngquant in my home repo for suse when I get a few minutes to write out a .spec.
Please let me know when done. Building is not something I can deal with. BS rpms I can. :-)
Well things move slow, but they move... Build Service Project:
https://build.opensuse.org/package/show/home:drankinatty/pngquant
RPMS 13.1 through Tumbleweed
http://download.opensuse.org/repositories/home:/drankinatty/
(pick your release)
pngquant-2.12.2-3.1.x86_64.rpm