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. Link to comment https://forums.phpfreaks.com/topic/147089-solved-bitmaps/ 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() Link to comment https://forums.phpfreaks.com/topic/147089-solved-bitmaps/#findComment-772207 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(); Link to comment https://forums.phpfreaks.com/topic/147089-solved-bitmaps/#findComment-772212 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(). Link to comment https://forums.phpfreaks.com/topic/147089-solved-bitmaps/#findComment-772213 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. Link to comment https://forums.phpfreaks.com/topic/147089-solved-bitmaps/#findComment-772216 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.