Convert creates lightened image.

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
gborbonus
Posts: 33
Joined: 2014-07-01T06:53:30-07:00
Authentication code: 6789

Convert creates lightened image.

Post 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.
Thank you,
Greg Borbonus
*nix system administrator
http://linkedin.com/in/gregborbonus
Skype: greg.borbonus
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert creates lightened image.

Post 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.
snibgo's IM pages: im.snibgo.com
gborbonus
Posts: 33
Joined: 2014-07-01T06:53:30-07:00
Authentication code: 6789

Re: Convert creates lightened image.

Post by gborbonus »

convert (all the images from 1-36) +append final_output.png

ImageMagick 6.8.9-0

Centos 6
Thank you,
Greg Borbonus
*nix system administrator
http://linkedin.com/in/gregborbonus
Skype: greg.borbonus
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Convert creates lightened image.

Post 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".
gborbonus
Posts: 33
Joined: 2014-07-01T06:53:30-07:00
Authentication code: 6789

Re: Convert creates lightened image.

Post by gborbonus »

thanks , I'll give it a shot
Thank you,
Greg Borbonus
*nix system administrator
http://linkedin.com/in/gregborbonus
Skype: greg.borbonus
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert creates lightened image.

Post 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.
gborbonus
Posts: 33
Joined: 2014-07-01T06:53:30-07:00
Authentication code: 6789

Re: Convert creates lightened image.

Post 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?
Thank you,
Greg Borbonus
*nix system administrator
http://linkedin.com/in/gregborbonus
Skype: greg.borbonus
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert creates lightened image.

Post 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.
gborbonus
Posts: 33
Joined: 2014-07-01T06:53:30-07:00
Authentication code: 6789

Re: Convert creates lightened image.

Post 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
Thank you,
Greg Borbonus
*nix system administrator
http://linkedin.com/in/gregborbonus
Skype: greg.borbonus
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert creates lightened image.

Post 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.
gborbonus
Posts: 33
Joined: 2014-07-01T06:53:30-07:00
Authentication code: 6789

Re: Convert creates lightened image.

Post 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
Thank you,
Greg Borbonus
*nix system administrator
http://linkedin.com/in/gregborbonus
Skype: greg.borbonus
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Convert creates lightened image.

Post by glennrp »

The bug is fixed in the current SVN repository and it will be released soon in ImageMagick-6.9.0-1.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert creates lightened image.

Post 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
Post Reply