Using CFIMAGE to Watermark an Image

Tutorials Shared by the Internet Community


  Top Tutorials     New Tutorials     Submit     Login     Register  

Using CFIMAGE to Watermark an Image

Using Coldfusion 8 and CFIMAGE to add Watermarks to Images on the fly.
  • Total Hits: 23883

  • Average Rating :
    URL RatingURL RatingURL RatingURL RatingURL Rating


  • Total Votes: 155 votes

  • Category: Cold Fusion/File Manipulation

  • Submitted on: 2008-03-07 04:58:28

  • Submitted By: Devesh Khanna

  • Set as Favorite


Using Coldfusion 8 and CFIMAGE to add Watermarks to Images on the fly.

1. 2 lines in which I basically give both images a name. The reason the watermark is a png is I want to have the ability to use alpha channels.

2. Next paste the watermark onto the image at 0x and 0y. I cheated and created the images the same size, but you could easily read the image info get the size then calculate where you want the watermark to be.

3. The last line writes the image to the browser in the format of a jpeg.

4. The Final Code should look like this

    More detail...

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 36.77%  57
 Two starsTwo star  Vote LeftVote MiddleVote Right 10.97%  17
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 12.26%  19
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 12.26%  19
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 27.74%  43

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.