Gamma-correct image scaling 2011-05-09
I recently heard of Eric Brasseur’s article Gamma error in picture scaling. The news that many graphics tools including the GIMP hurt certain colors during image scaling was rather surprising to me.
I was actually looking a command line tool to that job right out of the box — any recommendations besides ImageMagick/convert or netpbm/pamscale? — but I ended up writing a pygimp-based GIMP plugin yesterday. It does the job and comes with a simple GUI. Compared to core GIMP, the speed is quite disappointing though, probably because of using Python (and an extra layer) but C code.
Once you have the plugin installed
# sudo layman -a betagarden # sudo emerge -av media-plugins/gimp-imagescaler
you should find an item “Scale Image with correct Gamma…” at the bottom of the “Image” menu.
The code is free software, clean patches are welcome: