The way to use convert –strip command line from system operational perspective.

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: The way to use convert –strip command line from system operational perspective.

Post by fmw42 »

In the file you uploaded the Orientation says TopLeft, which ImageMagick gets from the exif:Orientation: 1. That means there is no rotation needed. Once you strip it, the orientation will say Orientation: Undefined, since there is not exif:Orentation field for ImageMagick to get the value. If there is no orientation value, then none will be applied.

If this is not expected, then there is something odd with the camera recording the orientation or some other processing has changed the orientation values.
PleskQuestion
Posts: 26
Joined: 2017-11-11T19:57:59-07:00
Authentication code: 1152

Re: The way to use convert –strip command line from system operational perspective.

Post by PleskQuestion »

Fmw42,

Thank you for your time.

So, it is all about the issue of smartphone's os.

"I do not understand at all why the image initially taken vertically that has the orientation of TopLeft and 1 is displayed rotated towards 90 degrees right in the website."

When the image was uploaded to pc (os of Windows 10) from iPhone it was already displayed rotated, and then I uploaded to the web server from pc via FTTTP. So the image was not affected by my application, hosting service, or strip command.

Do you, or does anyone know why this phenomenon happen??
Last edited by PleskQuestion on 2017-11-19T19:00:34-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: The way to use convert –strip command line from system operational perspective.

Post by fmw42 »

1 means it was take TopLeft orientation. So that agrees with IM. See http://www.impulseadventure.com/photo/e ... ation.html.

Did you process this image in any other tool that might have changed the orientation flag? How did you get the image out of the camera -- what tool did that?


Are you absolutely positive the camera was in a different orientation? Does the smartphone have a settings that might be in a mode indicating that setting of orientation is off?

You uploaded your image to Motown. Might they have modified or reformatted your image such that the orientation is changed?


Perhaps you should make some tests of your camera and take pictures in different orientations and see what IM identify -verbose says about them.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: The way to use convert –strip command line from system operational perspective.

Post by snibgo »

In the file http://metown.info/upload/save_image/595.JPG
, the EXIF data says the photo is horizontal, and doesn't need rotating. So software will not automatically rotate it.

If the metadata ever said the photo was vertical, that metadata has gone.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: The way to use convert –strip command line from system operational perspective.

Post by fmw42 »

This photo says it was taken with orientation=1 or TopLeft. So it will not be rotated by IM -auto-orient.

Again, to be sure, I suggest you retest your smartphone camera and run

Code: Select all

identify -verbose yourimage.jpg
and see if that agrees with the orientation you think it should have.

Check your smartphone settings to be sure auto-orientation is not disabled. Perhaps it is broken.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: The way to use convert –strip command line from system operational perspective.

Post by fmw42 »

P.S. If you think this image has a wrong value and want to correct it, you can use EXIFTOOL to edit the orientation flag to the proper value.
PleskQuestion
Posts: 26
Joined: 2017-11-11T19:57:59-07:00
Authentication code: 1152

Re: The way to use convert –strip command line from system operational perspective.

Post by PleskQuestion »

snibgo,

Thank you for your time.

> the EXIF data says the photo is horizontal,

Where in the exif data does it say that the photo is horizontal?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: The way to use convert –strip command line from system operational perspective.

Post by snibgo »

From here:
PleskQuestion wrote: exif:Orientation: 1
snibgo's IM pages: im.snibgo.com
Post Reply