These are the steps I used to create a gold coin with an embossed faerie dragon
image (see right) on it. The tools used were "XV" X Windows Image Viewer and
Editor, ImageMagick Image Filters,
and GifTrans for setting transparencies.
dragon1.gif:
Original image rescaled and gray scaled
dragon2.gif:
The image is resized to provide space for the coin edge.
Also to allow the image to emboss better the gray scale warped so solid black is the same as the background and the insides of the figure darkened. On an different image, it may have been better for me to have flood filled the background to the same color as the border.
Border outlines are often the reason a image fails to emboss nicely as it
produces a 'ridge' along the edge of the image instead of a smooth
indentation over the whole image.
dragon3.gif: Coin edge circle made with
convert -pen '#000' -draw 'circle 50,50 60,90' dragon2.gif dragon3.gif convert -pen '#FFF' -draw 'circle 50,50 60,87' dragon3.gif dragon3.gif
combine -compose bumpmap dragon2.gif dragon3.gif dragon4.gifNOTE: Imagemagick combine did not have a grayscale multiply!
convert -pen '#000' -draw 'circle 50,50 60,91' dragon3.gif dragon6.gifThe outside color (to make transparent) is then set, while the inside of the transparency mask is made transparent. This is the reverse transparency to what will be in the final image.
combine -compose over dragon5.gif dragon6.gif dragon7.gif
NOTE: re-coloring could also have need performed immediately after the
embossing, and in fact is probably better done at that stage.
gold_dragon_edge.gif:
Example of further processing using XV. Coin rotated 30 degrees
clock-wise, height shunk to 40% of original height, and image smoothed
before saving. All that is now needed is to clean the image edges for
transparency and to give the coin a bit of thickness.
NOTE: Any other rotation does not seem to work as the shadows become wrong. For other rotations, the image will have to be rotated first, embossed, and then the rest of the above steps applied.
XV does not have a 'matte' channel as such after the above processing the image edges have been anti-aliased into the transparency color (Bad move). To avoid this you should keep the mask separate to the image, processing in a simular way, masking only as the final step.
As ImageMagick does have a 'matte' or transparent image channel it may do the above processing better, retaining the mask without this anti-aliasing between the image and the transparency.
Picking a mask color which is the same as the final background of the image would have mean you would not have to worry about this anti-aliasing effect but would produce a 'shadow' around the image on any other background color, or no transpareny mask at all.
Update if you create a X bitmap of the transparency color a new option to ImageMagick "convert" command will now let you ues it as a transparency mask using a command like...
combine -compose ReplaceMatte dragon3.gif mask.xbm dragon6.gif
Imagemagick also allows 'opaque transparency' (matte channel) with partical transpency (use the above with a shaded mask image), but the GIF format does not! Formats which allow partical transparency include MIFF, TIFF, or PNG.
https://antofthy.gitlab.io/graphics/coin/