Miscellaneous
  Home arrow Miscellaneous arrow Page 3 - Overlapping Images with GD
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Download TestComplete 
Forums Sitemap 
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MISCELLANEOUS

Overlapping Images with GD
By: Codewalkers
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 5
    2004-09-18

    Table of Contents:
  • Overlapping Images with GD
  • Combining Images with GD
  • Imagecopymerge explained

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Overlapping Images with GD - Imagecopymerge explained


    (Page 3 of 3 )

    The imagecopymerge function works like this:

    imagecopymerge(background or "destination" image, added or "source" image, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)

    Imagecopymerge takes a part of the overlaid or "source" image, from src_x and src_y to a hight and width defined by scr_w and src_h. dst_x and dst_y are the x and y coordinates at which the top left corner of the overlaid image will begin. "pct" is the percent transparency of non-transparent areas of the overlaid "source" image.

    For adding a faint logo over an art print to deter copying, try a pct number below 50, but high enough to be visible. For a solid image, such as placing a cropped image of a person onto a photo of an exotic location, try 100 for a solid image... or make them appear as a "ghost" using something like "40" or "50".

    Try experimenting with the variables a bit to see how your results may vary. The image below was achieved by the combining of the same images as above, but using "50" for the value of "pct", instead of "100".


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · thanks a bunch for the tutorialit really helps me!
       · Hey,I have a problem, I am using a form to submit the two images in which the...
       · Thanx Chaos Zen,This was nearly exactly what I was looking for for a...
       · could this be used with a variable overlay eg $variable?
     

    MISCELLANEOUS ARTICLES

    - Using PHP to Stream MP3 Files and Prevent Il...
    - 10 Must Have Firefox Improvements
    - All About OpenOffice 3.0
    - Shell Script Writing
    - Loops in the UNIX Shell
    - The Test in the UNIX Shell
    - Data Streams and the UNIX Shell
    - Control Mechanisms of the UNIX Shell
    - Variables Within the UNIX Shell
    - The Shell and UNIX
    - In Detail: UNIX File Systems
    - Rights Management in UNIX
    - UNIX File Systems
    - The Terminal in UNIX
    - Operating Systems and UNIX





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek