A user, StefanD, reported a bug where uploading images makes them appear black, not just darker. The issue was tested with the provided image file, and elberet suspected it might be an ImageMagick issue, but couldn’t reproduce it locally. zogstrip found that the Docker image had an outdated version of ImageMagick (6.7.7-10).
anon25879736 suggested that the issue might be related to the image being too dark to begin with, but codinghorror pointed out that updating ImageMagick did not fix the problem. elberet proposed that the issue might be due to a bad version of libpng.
After further investigation, elberet created a script to compile ImageMagick and libpng, and sam integrated it into the Dockerfile. The updated image seems to handle dark images better. To update, users need to run cd /var/discourse, git pull, ./launcher rebuild app, ./launcher enter app, and rake avatars:clean.
I saw the bug in which the gravatars turn dark and this does not seem to be the same.
I want to upload an asset image to the asset thread. So as it says I click on reply then on upload
and I select the file I want to upload. When it’s uploaded it looks totally pitch black.
In the above example, the first image with gray patterns is how it looks when I link it from the web and the black box under it is how it looks when I upload it from my machine.
Looks like ImageMagick strikes again — except that I can’t reproduce this locally.
Uploading StefanD’s file on meta and try results in a solid black image; uploading it to my local Discourse does not. Since I’m not using the Docker setup, is the ImageMagick version in the docker base image outdated?
Edit: Make sure to check the full size images. The thumbnails are reduced in size enough that the color shift doesn’t have an effect on the darkening of the image.
FWIW, my ImageMagick dynamically links against libpng16 and I have libpng 1.6.16 installed. That version was released in late December 2014. And… the best available version in Ubuntu Trusty is 1.2.50!?
Edit: yeah, no, I’m not touching the Dockerfile. You guys can integrate that in there. For testing, I’ve hacked the launcher and had it run this script just before pups.