Jump to content

Archived

This topic is now archived and is closed to further replies.

galvin

GD Question: Create one large image from multiple image?

Recommended Posts

With imagecreatefromjpeg ( string $filename ), is there a way to create ONE large image from MULTIPLE smaller images?  It seems like it only allows you to refer to ONE other file to create your new image.

Share this post


Link to post
Share on other sites

You can have multiple image resources at one time....  So, you essentially just need to do the following:

 

-get a list of the images

-store resources of the images in variables

-get the width/height of each image (do this as you're storing them, or perhaps before)

-create a new image resource (imagecreatetruecolor) of the total width and height of your images

-Place each image into the new resource.

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.