• home
  • forum
  • my
  • kt
  • download
  • Overlaying 2 Images

    Author: 2009-02-27 10:27:26 From:

    In this tutorial i will show you how to over lay one image onto another using coldfusions built-in image functions, this method can be used to add a walter mark to an image.

    First of all we need 2 images, here are my images image 1 and image 2 i will overlay image 2 onto image 1 using the ImageOverlay function.

    We firstly get both of the images using the cfimage tag and give them names

    <cfimage source="http://cfproject.co.uk/coldfusionsamples/clio.jpg" name="baseImage">
    <cfimage source="http://cfproject.co.uk/coldfusionsamples/cfp.jpg" name="topImage">

    We then simply overlay them using the Image Overlay function and write them to the browser

    <cfset ImageOverlay(baseImage,topImage)>
    <cfimage source="#baseImage#" action="writeToBrowser">

    Here is an example of the finished image

    discuss this topic to forum

    relation tutorial

    No information

    New

    Hot