Page 1 of 1

Convert creates lightened image.

Posted: 2014-11-22T08:33:11-07:00
by gborbonus
hey guys,

I am using a convert +append command to join a bunch of images.
Image

Notice that lightened part in the middle?

Well, thats being generated from a bunch of images, here's an image in the middle that appears lightened, but this image is not lightened at all.

Image

They all follow the same format, so you can use the following format to see the results.:
http://www.brandnex.com/wristbands/test/hw_[1-36]0_wristband_none.png

Anyone got any idea why it's lighter? I need to resolve this so I can move on with this project.

Forgot to mention that it only happens for images where the angle is so much that there is no text.

Re: Convert creates lightened image.

Posted: 2014-11-22T09:07:04-07:00
by snibgo
A bit more information would help us to help you.

What version of IM? On what platform? What is the EXACT command you gave? Please also supply any input files.

Re: Convert creates lightened image.

Posted: 2014-11-22T10:44:51-07:00
by gborbonus
convert (all the images from 1-36) +append final_output.png

ImageMagick 6.8.9-0

Centos 6

Re: Convert creates lightened image.

Posted: 2014-11-22T10:46:01-07:00
by gborbonus

Re: Convert creates lightened image.

Posted: 2014-11-22T10:52:35-07:00
by glennrp
The group of images where none of the green text is visible are grayscale, and ImageMagick
interprets them as being in a linear colorspace. The rest have color so are interpreted as
being in the sRGB colorspace.

Add "-colorspace sRGB" as the first argument to "convert".

Re: Convert creates lightened image.

Posted: 2014-11-22T11:00:29-07:00
by gborbonus
thanks , I'll give it a shot

Re: Convert creates lightened image.

Posted: 2014-11-22T11:00:55-07:00
by fmw42
Why are we interpreting grayscale png images as linear now?

Code: Select all

hw_200_wristband_none.png
 Gamma: 1
  Background color: gray(255)
  Border color: gray(223)
  Matte color: gray(189)
  Transparent color: gray(0)
  Interlace: None
  Intensity: Rec709Luminance
I thought that was changed back to non-linear grayscale (gamma=0.4545 Rec709luma) quite a while ago as of 6.7.7.8. See viewtopic.php?f=4&t=21269

Also a proper linear gray image should be darker than a non-linear gray and here it is showing up lighter than the sRGB color labeled gray images.

Re: Convert creates lightened image.

Posted: 2014-11-22T11:06:21-07:00
by gborbonus
Sorry, that did not work.

All the images go through the exact same process. Why would it make some images greyscaled and others not?

Re: Convert creates lightened image.

Posted: 2014-11-22T11:19:16-07:00
by fmw42
This works for me (though -colorspace gray should also work, but does not):

convert hw_10_wristband_none.png hw_180_wristband_none.png -set colorspace sRGB +append result.png

Where did these images originate? Did you create them? With what software? If with IM what were your commands. IM should be creating/reading grayscale png (I believe) as non-linear.

Re: Convert creates lightened image.

Posted: 2014-11-22T11:46:19-07:00
by gborbonus
The images are jpg's that were rotated and converted to png's. Then overlayed with an imagemagick text generation script.

that colorspace argument worked. Thanks

Re: Convert creates lightened image.

Posted: 2014-11-22T11:49:03-07:00
by fmw42
Can you provide one of the pure gray jpgs and the exact command you used to rotate and convert to png without adding any color label. That would be helpful to see what is going on. I believe there is a bug somewhere, possibly with png encoding.

My guess is that the jpgs were linear gray (gamma=1) and when you converted them to pngs, the grayscale ones with no colored text stayed as linear gray, but once you add color to the image, those will be converted to non-linear sRGB. But to be sure, I would need to have one of your original jpg images.

Nevertheless, Glenn's solution of using -colorspace rather than -set colorspace should have worked. So I think there may be a bug that I have now reported.

Re: Convert creates lightened image.

Posted: 2014-11-23T02:42:27-07:00
by gborbonus
Thanks Fred. I can give you access to the source on a one on one bases, but this code generates something that in my industry is actively being worked on by many competitors. I've finally created it.

I cannot show it on a website like this, it would be FAR too risky.

Please feel free to contact me directly, I actually need to talk with you directly anyway, in regards to the usage of your script

Re: Convert creates lightened image.

Posted: 2014-11-23T04:11:31-07:00
by glennrp
The bug is fixed in the current SVN repository and it will be released soon in ImageMagick-6.9.0-1.

Re: Convert creates lightened image.

Posted: 2014-11-23T12:45:11-07:00
by fmw42
gborbonus wrote:Thanks Fred. I can give you access to the source on a one on one bases, but this code generates something that in my industry is actively being worked on by many competitors. I've finally created it.

I cannot show it on a website like this, it would be FAR too risky.

Please feel free to contact me directly, I actually need to talk with you directly anyway, in regards to the usage of your script
You can email me directly at fmw at alink dot net or send me PM on this forum.

If you do not feel comfortable sending the image, can you provide the listing from

identify -verbose youroriginal.jpg