Skip to main content
Known Participant
September 13, 2012
Answered

Overlay Image Within Coordinates

  • September 13, 2012
  • 1 reply
  • 1292 views

Hey all,

I recently have a project which invovles attempting to automatically "mock-up" images with a standard logo.  For example, I have 1000 images of products, and I have one logo image that needs to be placed (over-layed) on top of each image.  I know I can do this with ColdFusion's imageOverLay() function.  However, I assume this always puts the overlayed image right in the middle of the underlying image (assuming they have the same width and height parameters).  I was wondering if there was any way possible to specify and X/Y coordinate of the top-left corner of the overlaying image, and have the overlayed image placed in that location?

An example of a site:

http://www.internalsearch.expandedproductsearch.com/catalog/48/

You'll notice that all of the products have an image properly placed on the products.  And I can assure you this wasn't done by hand.  They must have a way to specifying where the overlaying image should go for each product, and then it just automatically puts the overlaying image (logo) in that spot.  Can anyone think of any other way to do this?

Any information would be greatly appreciated!

    This topic has been closed for replies.
    Correct answer pete_freitag

    You will want to use the ImagePaste function instead which lets you specify an x, y position to place the logo: http://cfdocs.org/imagepaste

    1 reply

    pete_freitag
    pete_freitagCorrect answer
    Participating Frequently
    September 13, 2012

    You will want to use the ImagePaste function instead which lets you specify an x, y position to place the logo: http://cfdocs.org/imagepaste

    wcx08Author
    Known Participant
    September 13, 2012

    Boy...I definitely didn't do my homework very well.  Thank you for your help!