0

My requirement is to convert a image with a transparent background to look like gold foil (the way it’s printed on leather etc.)

I've been using ImageMagick and am getting excellent results with certain kind of PNGs but not with others.

The Image Magick command I am using is:

composite foil.png tmp.png logog.png outputg.png

  • foil.png is just a gold foil image
  • tmp.png is a plain/empty transparent background png
  • logog.png is the logo with transparent background
  • outputg.png is the output (this is what I need)

However, this kind of result does not occur in most other images with transparent backgrounds. Ex.

  • logom.png gives outputm.png which is all gold
  • logos.png gives outputs.png which is all gold and all wrong

Download all files as zip from here from here http://sdrv.ms/1h7QW4A or view from http://s.imgur.com/a/ExLRE

I checked the encodings of these all PNGs and they are all the same. What is wrong with logom and logos that the outputs are not as they should turn out to be?

If I am approaching the solution from the wrong direction, please suggest alternatives.

Danack
  • 24,939
  • 16
  • 90
  • 122
darkblack
  • 21
  • 1
  • 4
  • You should post working code if you want people to improve it. – Danack Oct 23 '13 at 22:13
  • there is no code. Only the code 'composite foil.png tmp.png logog.png outputg.png' is run in the command-line (after imagemagick) is installed – darkblack Oct 24 '13 at 05:11
  • I should read the question more carefully then. This isn't an answer, but: the microsoft one fails because it is too big. Making it smaller with "convert logom.png -resize 25% logom_small.png" first makes the effect work. The Samsung one fails because it is just blue. Converting it to grayscale first (and resizing a bit) makes it work "convert logos.png -recolor '.2 .5 .3 .2 .5 .3 .2 .5 .3' -resize 90% logos_small.png" – Danack Oct 24 '13 at 20:38

0 Answers0