How to Mirror an Graphic

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

How to Mirror an Graphic

Post by Pyrite »

Does anyone know of a way to mirror a graphic with php. I looked through the gd manual real quick and didn't see any functions to do it. Anyone?
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

I was playing around with manipulating graphics (with GD) a while ago, and like you said there are no built-in functions to do the more technical stuff really.

The only way I could flip graphics and do effects like 'pop-art' was to read every pixel of the image into an array and then spit them into a new image in a different order (maybe doing the odd bit of filtering here and there)... It's not easy but it's possible.

If I can find any of my old code/functions I will drop you a PM.
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

Like theres gd functions to rotate them and stuff. May be if there is one to just flip horizontally would work for me. Which is kinda the same thing ..
Post Reply