Page 1 of 1

How to Mirror an Graphic

Posted: Wed Jan 07, 2004 6:37 pm
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?

Posted: Thu Jan 08, 2004 12:04 am
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.

Posted: Thu Jan 08, 2004 5:14 am
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 ..