rotating picture
rotating picture
How do i found ,using a code in vbscript, if a picture is rotated and how many degrees is rotated?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: rotating picture
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.
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: rotating picture
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.
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.