Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

ImageMagick works fine:

  $ convert lama.jpg -gamma .45455 -resize '50%' -gamma 2.2 slama.jpg


That is clearly and directly covered in the article. Also, forcing the user to include manual gamma correction for a format that already has a known gamma curve is not ideal.


> Also, forcing the user to include manual gamma correction for a format that already has a known gamma curve is not ideal.

To this point, ImageMagick has built in understanding of colorspaces:

    convert lama.jpg -colorspace RGB -resize '50%' -colorspace sRGB slama.jpg
In English: Read lama.jpg, convert it to a linear RGB colorspace, rescale to 50%, convert it to sRGB, write to slama.jpg

This is apparently also covered in the article, more as an aside, but it should be the first and foremost way to do it with ImageMagick.


Neat thanks, did not know about the -colorspace option.


Thanks, didn't notice it, was way down near the end. Also I'm glad it does not force it, I have most of my old JPEGs using 0.55 and 1.8 instead unfortunately.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: