Michdd Posted February 27, 2009 Share Posted February 27, 2009 In PHP GD is there something where you can create a new image from a certain (x,y)? Like copying a certain part of an image. For my use I need to copy only part of a sprite sheet and store that copied image in a variable so I can layer it with other copied parts of images. Quote Link to comment Share on other sites More sharing options...
samshel Posted February 27, 2009 Share Posted February 27, 2009 check if this is what u r looking for : imagecopyresampled() Quote Link to comment Share on other sites More sharing options...
Michdd Posted February 27, 2009 Author Share Posted February 27, 2009 Actually.. This is a stupid question. I've used PHP GD a lot before. And the function that I need to use for this, is one that I've used in the past.. imagecopymerge(); Quote Link to comment Share on other sites More sharing options...
samshel Posted February 27, 2009 Share Posted February 27, 2009 imagecopymerge(); will merge ur images.. to get samples in the first place u will have to use imagecopyresampled(). Quote Link to comment Share on other sites More sharing options...
Michdd Posted February 27, 2009 Author Share Posted February 27, 2009 imagecopymerge(); will merge ur images.. to get samples in the first place u will have to use imagecopyresampled(). I need to get different resources from a certain x,y that are 96x128px then merge them into a main image. This will work fine. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.