What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » imagecopy in PHP

1 votes - 5 average   imagecopy in PHP
Author: Message:
fluffy_lobster
Veteran Member
*****

Avatar
Posts: -2

Posts: 1391
Reputation: 23
36 / Male / Flag
Joined: Nov 2002
RE: imagecopy in PHP
ok, i'll go through the arguments for you in order.  each bullet is an argument (one of the parameters separated by commas):

  • dst_im is the image you're placing the other image on top of.  I assume that's the one created by the script, so it will already have a resource variable.  Probably $im.
  • src_im is the same kind of reference to an image as the first one.  If this is a normal image, you first have to load it into an image resource, using imagecreatefrom*(), for example: $im2 = ImageCreateFromGIF('foo.gif');  -- you then use $im2 as the argument in this function
  • dst_x is the number of pixels from the left of the first image that you want the second image to start.  so if you wanted it on the absolute left, this is 0
  • dst_y is the same thing but from the top.  if you want to copy the image to 10px below the top of the image then set this to 10, etc.
  • src_x is the point from the left of the second image that you want to start copying the image.  if you want the whole image this will be 0.  if you want to crop off the first 10 pixels on the left then this is 10.
  • src_y is the same for the vertical dimensions.  a pixel dimension from the top of the second image
  • src_w is the width of the box that will copy from the second image.  if you want to copy on the whole image then this is the image's width.  if you cropped 10px off the left, this will be 10 fewer than that.  gottit?
  • src_h is the same, but for the height

at the end of it, the image linked to by the resource in the first argument will be updated with the copy of image 2 as you specified

This post was edited on 09-04-2004 at 06:14 PM by fluffy_lobster.
09-04-2004 06:13 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
imagecopy in PHP - by Moo on 09-04-2004 at 02:03 PM
RE: imagecopy in PHP - by Choli on 09-04-2004 at 02:18 PM
RE: imagecopy in PHP - by Moo on 09-04-2004 at 02:30 PM
RE: imagecopy in PHP - by fluffy_lobster on 09-04-2004 at 06:13 PM
RE: imagecopy in PHP - by Moo on 09-04-2004 at 06:15 PM
RE: imagecopy in PHP - by fluffy_lobster on 09-04-2004 at 06:17 PM
RE: imagecopy in PHP - by Moo on 09-04-2004 at 06:19 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On