Create a memory version of a mirror image

GD and GD2 are useful libraries for creating graphics on-the-fly. Discuss your PHP GD and GD2 scripts here.

Moderators: onion2k, General Moderators

Create a memory version of a mirror image

Postby griffinmt » Sun Nov 22, 2009 8:27 pm

Couln't find this one covered (or can't see the forest for the trees?).

I have a php script that builds a png image that get sent out to a webpage but is not stored otherwise. It is reasonable complicated to draw, but before I add the needed text to it, I have to be able to create a horizontal mirror image. Doing it from scratch requires a lot of adjustments to the calculations used.

Anyone know of a function that can take an image resource and mirror it? :?:
griffinmt
Forum Commoner
 
Posts: 35
Joined: Sun Jul 16, 2006 8:37 pm
Location: Michigan

Re: Create a memory version of a mirror image

Postby John Cartwright » Sun Nov 22, 2009 8:35 pm

Code: Select all
if ($toBe || $notToBe) echo 'That is the question'; 

NEW HERE?: Please read the Forum Rules, and take the Forum Tour before posting!
User avatar
John Cartwright
Site Admin
 
Posts: 11470
Joined: Tue Dec 23, 2003 3:10 am
Location: Toronto

Re: Create a memory version of a mirror image

Postby griffinmt » Sun Nov 22, 2009 9:59 pm

Thanks, that was exactly what I needed. Just had to switch it to mirror across the width instead of height.

Wish they would make this a regular funtion, cause it is noticably slow. But beggers can't be choosers I guess.
griffinmt
Forum Commoner
 
Posts: 35
Joined: Sun Jul 16, 2006 8:37 pm
Location: Michigan


Return to PHPGD.com

Who is online

Users browsing this forum: No registered users and 3 guests