Page 1 of 1

rotating picture

Posted: 2011-08-24T01:04:23-07:00
by adelina
How do i found ,using a code in vbscript, if a picture is rotated and how many degrees is rotated?

Re: rotating picture

Posted: 2011-08-24T16:14:20-07:00
by anthony
At this time determining rotation of an image is not a built in for Imagemagick. Though a UNIX shell script by Fred Weinhaus can determine this by one means.

There is a operation to unrotate -deskew a very slightly rotated image. By again Fred has another UNIX shell script that uses a different technique to deskew images with larger rotations.

Fred's ImageMagick Scripts
http://www.fmwconcepts.com/imagemagick/

These all depend on looking for the rectangular area of an image on a plain colors background image. For a skewed text image on a white background a completely different technique (looking for the angle of text lines) is needed.

Re: rotating picture

Posted: 2011-08-24T17:00:00-07:00
by fmw42
Does not the EXIF info in the file tell whether the image is rotated by 90 degree increments (so that IM can do an auto-orient. see http://www.imagemagick.org/script/comma ... uto-orient

If you are trying to determine the rotation so that you can unrotate the picture, see my unix bash script, unrotate at the link below.