Change color
Change color
Hello!
I´m totally new with ImageMagick. I use Ubuntu x64.
I have a lot of PNG, with indexed color (only black) with transparent Background.
I need different colours of this .png files.
Is it possible with ImageMagick?
Thank you!
I´m totally new with ImageMagick. I use Ubuntu x64.
I have a lot of PNG, with indexed color (only black) with transparent Background.
I need different colours of this .png files.
Is it possible with ImageMagick?
Thank you!
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Change color
To change black into (say) red:
Code: Select all
convert in.png -fill red -opaque black out.png
snibgo's IM pages: im.snibgo.com
Re: Change color
Hello!
Many thanks to this fast reply, but there are still black colors.
Also the transparenz of the black color I lost.
Attached the original and the converted to red.
In the Red Picture you see it is different too the original.
http://de.tinypic.com/r/34nruba/8 (original)
http://de.tinypic.com/r/1zwz2w7/8 (converted to red)
Many thanks to this fast reply, but there are still black colors.
Also the transparenz of the black color I lost.
Attached the original and the converted to red.
In the Red Picture you see it is different too the original.
http://de.tinypic.com/r/34nruba/8 (original)
http://de.tinypic.com/r/1zwz2w7/8 (converted to red)
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Change color
Code: Select all
convert in.png -alpha off -fill red -opaque black -alpha on out.png
snibgo's IM pages: im.snibgo.com
Re: Change color
The Hello!
Thank you ... near to the result who I need.
Now it is complete red, but the black parts (with some transparenz) are now filled.
Did you know what what I mean?
The smooth edges of the black color is now hard in red.
Thank you ... near to the result who I need.
Now it is complete red, but the black parts (with some transparenz) are now filled.
Did you know what what I mean?
The smooth edges of the black color is now hard in red.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Change color
Code: Select all
convert in.png -alpha off -fill red -opaque black -alpha on out.png
snibgo's IM pages: im.snibgo.com
Re: Change color
Hi!
I use Windows 6.9.1-1-Q16-x64 ... maybe this is the problem?
I use Windows 6.9.1-1-Q16-x64 ... maybe this is the problem?
Re: Change color
Hello again!
I checked the files .. some are indexed colours, some are RGB.
Is for RGB the same command?
I checked the files .. some are indexed colours, some are RGB.
Is for RGB the same command?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Change color
The same command is used for RGB and indexed files.
What version of ImageMagick do you use?
What version of ImageMagick do you use?
snibgo's IM pages: im.snibgo.com
Re: Change color
I use 6.9.1.1.Q16-x64 on Windows 8.1 x64.
I also tried 6.9.1.1.Q8-x64 ... same result.
Is there somewhere a link to 6.9.1-0 ?
I also tried 6.9.1.1.Q8-x64 ... same result.
Is there somewhere a link to 6.9.1-0 ?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Change color
6.9.1.1 should be fine.
I examined the alpha values with Gimp. My result is:
I examined the alpha values with Gimp. My result is:
snibgo's IM pages: im.snibgo.com
Re: Change color
Ok, I guess with my english I could not describe it clearly.
I have the same result, but it is not same as original.
When you check the original Image, you can see there are some pixel semi-transparent (when you open in Gimp and zoom in).
After convert, it lost this semi-transparent pixel and show full color pixel.
Did you know what I mean?
Thank you for your great help(!)
I have the same result, but it is not same as original.
When you check the original Image, you can see there are some pixel semi-transparent (when you open in Gimp and zoom in).
After convert, it lost this semi-transparent pixel and show full color pixel.
Did you know what I mean?
Thank you for your great help(!)
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Change color
In Gimp, I zoom to 800% and use the eyedropper tool. This tells me the pixel values. The background has alpha = 0%. The red guitar has alpha at many values, including 1%, 5%, 11%, 12%, 43%, 47%, 77% and 100%.
snibgo's IM pages: im.snibgo.com
Re: Change color
Ok, that is strange!
Which Version of Gimp you are using?
Which Version of Gimp you are using?
Re: Change color
Hello!
I open the new File with Windows paint, and he show me the image correct.
So it must be a problem of Gimp.
Thank you for your help ... it is solved(!)
I open the new File with Windows paint, and he show me the image correct.
So it must be a problem of Gimp.
Thank you for your help ... it is solved(!)