Mouse-Imaging-Centre / pydpiper

Python code for flexible pipeline control
Other
24 stars 10 forks source link

ImageMagick QC images are broken for some versions of imagemagick #383

Closed gdevenyi closed 5 years ago

gdevenyi commented 5 years ago

ImageMagick tries to be clever with grayscale PNG images and decides that it should encode those in a different colourspace than normal. Most viewers/libraries aren't implementing that properly, so when you open up QC images they look "very dark" and you can't see much of anything. Only imagemagick's "display" does an okay job.

Solution is to enforce the output colour space on any imagemagick calls: -colorspace sRGB or, alternatively, forcing the png formats: -define png:format=png24

Discussion: https://www.bennadel.com/blog/2825-fixing-grayscale-png-thumbnail-images-that-come-out-too-dark-in-imagemagick-6-7-7.htm

http://adamish.com/blog/archives/746

Examples, using the "feh" viewer, same results in "eog" Before: image

After: image

gdevenyi commented 5 years ago

Fixed by switching to JPG output.