> 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.jpgThis 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.