mirror image with gd

Need help with Photoshop, the GIMP, Illustrator, or others? Want to show off your work? Looking for advice on your newest Flash stuff?

Moderator: General Moderators

Post Reply
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

mirror image with gd

Post by andre_c »

The only way I have found to mirror an image with gd is to copy each row of pixels into a new image in reverse order using a for loop.

Can anyone think of a better way?
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Shell out to ImageMagicks 'convert' utility? It has a nice -flip option to create a mirror image.
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post by andre_c »

Thanks, Mark, I'll look into that...
... so there isn't a better way to do that with gd?
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Not that i can think of, no.
Post Reply