Hi,
I've got a PNG with a transaparent background. I want to put the image onto a sold whitebackground. Currently I use GIMP to a white layer and then merge the layers down. I can't seem to come up with a way to do this in ImageMagick.
Something simple like:
convert -quality 75 -background #ffffff test_image.png new_image.jpg
doesn't do the job, it always ends up on a black background.
TIA
Ian
Changing a transaparent background to a fixed colour
Re: Changing a transaparent background to a fixed colour
If using a 6+ version of IM read your image in first. This should do what you want:
Code: Select all
convert test_image.png -fill red -opaque transparent -quality 75 new_image.jpg
Re: Changing a transaparent background to a fixed colour
Thanks - that sort of works, but looks awful. I think the issue is with semi-transparent pixels.
I have however just found a solution,
Thanks for the reply.
I have however just found a solution,
Code: Select all
convert -page +0+0 test.png -background #ffffff -layers merge output.jpg