how to rotate an image 180 degrees

L

Leo Koolsbergen

Hallo,

Maybe a very simpel problem, but I cannot find a solution. From a webcam I
can retreive pictures, but as the cam is positioned upside down I have to
rotate the (jpeg) pictures. I've searched about 50 javascripts sites, but I
did not find what I am looking for. Can anyone help me with this?

Greetings
Leo Koolsbergen
 
M

McKirahan

Leo Koolsbergen said:
Hallo,

Maybe a very simpel problem, but I cannot find a solution. From a webcam I
can retreive pictures, but as the cam is positioned upside down I have to
rotate the (jpeg) pictures. I've searched about 50 javascripts sites, but I
did not find what I am looking for. Can anyone help me with this?

Greetings
Leo Koolsbergen


Check out this link:

http://www.walterzorn.com/rotate_img/rotate_img.htm
 
J

Joakim Braun

Leo Koolsbergen said:
I found this site before I asked the question. Didn't seem to work. I think
I don't know enough about javascript. Can someone show how to use this
script?

You did download and correctly link the linked script
http://www.walterzorn.com/scripts/wz_rotateimg.js , which is required for
the function to work? There's also a note in that script file about a
transparent image needed for Netscape. The walterzorn.js file may also be
required.

From the description, note that the script appears to make one copy of the
image for each pixel. So a 100x100 pixel picture will be copied and
displayed 10 000 times, and a 600x800 image 460 000 times. This may not make
for a good user experience.

Image rotation can be done easily with server-side technology like PHP, but
AFAIK not with standard Javascript/Ecmascript. But perhaps the camera
software could be set to deliver a rotated picture?

Joakim Braun
 
L

Leo Koolsbergen

Joakim Braun said:
You did download and correctly link the linked script
http://www.walterzorn.com/scripts/wz_rotateimg.js , which is required for
the function to work? There's also a note in that script file about a
transparent image needed for Netscape. The walterzorn.js file may also be
required.

From the description, note that the script appears to make one copy of the
image for each pixel. So a 100x100 pixel picture will be copied and
displayed 10 000 times, and a 600x800 image 460 000 times. This may not
make
for a good user experience.

Image rotation can be done easily with server-side technology like PHP,
but
AFAIK not with standard Javascript/Ecmascript. But perhaps the camera
software could be set to deliver a rotated picture?

Joakim Braun

The viewer of the camera can rotate the image, but the saved images stay
upside down. Every time I use the activeX (from the cam) I have to rotate.
 
L

Leo Koolsbergen

(e-mail address removed) schreef:
It could probably be done with filters in IE
http://msdn.microsoft.com/workshop/author/filter/filters.asp but
wouldn't be very cross browser. I believe Mozilla also implements it's
own filters but I can't seem to find a link to them.

I would agree with the previous poster and do it on the server side
using PHP, perl or the imagemagick COM library if you are on an MS
server.

Ok. This filter works just fine. No problem with other browsers. It's for
the owner of the shop in which the camera is installed. And he uses IE.

Thanks to you all.

Leo Koolsbergen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top