0

Hello!

I'm trying to flip an image horizontally on the client side. Is it possible to rotate or change the orientation of an image by using JavaScript or CSS2?

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by tinymark
0

My first thought isn't going to be easy. Here's a little description of the problem. Take a picture and look at it one raster line at a time. Load the pixel information, per pixel, into an array. Read out the array backwards to an empty image off screen. Repeat for each raster line. When the image is built, cache it and be ready to swap it out with it's mirror.

Good speech, but how. Each image file, .bmp, .jpg, .png has a file format. I used to know bmp but I'll bet you want something else.
http://www.libpng.org/pub/png/spec/1.2/PNG-Structure.html for png and
http://en.wikipedia.org/wiki/JPEG for jpeg.

Once I got going, I could make any bmp I wanted to make. Skip past formatting sections and read the data inside the data section of the bmp file. I used this for a zooming feature I added into a VB program I wrote.

Hope this helps.

0

I was hoping that there was a more direct method of displaying a mirror image.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.