Hello,
In this situation I have two images that need to be layered together one is slightly larger than the other and both need to be centered- both of them are PNG files.
Is there a function you know of that can take two png files and paste them together, they will always have the same specs.
1 reply to this topic
#1
Posted 03 July 2011 - 11:36 PM
Please, write clearly with proper structure. Double spacing makes the text feel un-jointed, Capitalizing Every Word Means People Stop Before Every Word Sub-Consciously Which Is A Pain In The Backside, and use code tags! (The right most styling box).
|
|
|
#2
Posted 04 July 2011 - 02:02 AM
There are various merge functions, i.e. imagecopymerge that can perform this. You could retrieve the width of the overlaying image, cut this number in half, and apply it to the center point of the background image to have it centered. You could do the same with the height of the image for vertical centering.
PHP: imagecopymerge - Manual
PHP: imagecopymerge - Manual
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









