Page 1 of 2

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

Posted: 2017-11-15T13:11:12-07:00
by PleskQuestion
I have several questions regarding its system operation.

[root@server-XXXXXXX-X ~]# convert /var/www/vhosts/xxxxxx.com/httpdocs/upload/temp_image/*.jpg -strip /var/www/vhosts/xxxxxx.com/httpdocs/upload/temp_image/*.jpg
Killed

1. Above is what I tried, and does it make sense to you from technical point of view? It says killed, and does it mean that ImageMagick took exif data off from all those jpg files in temp_image folder?

2. Is this command line something that I have to run every time I upload file to the application? Or will it take care of the task forever once I run the convert –strip command line?

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

Posted: 2017-11-15T14:03:57-07:00
by fmw42
You cannot use a wild card for both input and output using convert. If you want to process a whole folder of files and keep the output names the same as the input names, then use mogrify rather than convert. See http://www.imagemagick.org/Usage/basics/#mogrify

ImageMagick does not watch folders to run new image when the appear. You will need to use a cron job to do a timed command for any images in the upload folder and then move them after processing.

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

Posted: 2017-11-15T16:21:45-07:00
by PleskQuestion
fmw42,

Thank you for your time.

Below is what I had after about 5 min when I run it, there are about 2000 jpg images in save_image folder, and since there are no error appeared after all, does it mean that ImageMagick mogrify command line eliminated all those exif data from jpg files that exist in save_image folder or I still have to check something ?

[root@server-xxxxxxx-x ~]# mogrify -strip /var/www/vhosts/xxxxxxx.com/httpdocs/upload/save_image/*.jpg
[root@server- xxxxxxx-x ~]#

When I check the website to find out it seems that pictures still possess exif data.

Regarding a cron job, I will work on it later.

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

Posted: 2017-11-15T16:25:32-07:00
by fmw42
What is your IM version and platform? Can you post a link to one of your JPG files that have EXIF data that you want to remove. I can test to see if it works on current versions of ImageMagick.

How did you check the images after running the command to see if the EXIF data was still there?

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

Posted: 2017-11-15T16:28:17-07:00
by fmw42
I just tested mogrify on one JPG image that had EXIF data and it remove the EXIF data according to identify -verbose P1050001.JPG

Code: Select all

mogrify -strip P1050001.JPG
works fine for me on IM 6.9.9.23 Q16 Mac OSX.

It also works fine using IM 7.0.7.11 Q16 Mac OSX.

Code: Select all

magick mogrify -strip P1050001.JPG

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

Posted: 2017-11-15T16:38:37-07:00
by fmw42
One other point. ImageMagick will read your JPG, decompress it, strip the meta data, then compress it again before saving when using convert or mogrify. That may cause a change in the quality of the result, since JPG is a lossy compression. If you do not want this to happen, then use EXIFTOOL to remove your EXIF data rather than ImageMagick.

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

Posted: 2017-11-15T18:30:30-07:00
by PleskQuestion
fmw42,

Thank you for your time.

Below is the versions of softwares installed.

OS:centos-6 (x86_64)
Plesk 17.0.17
ImageMagick-6.7.2.7-6.el6.x86_64
ImageMagick-devel
php-devel
PECL imagick

When I saw the website, the particular picture(taken from iOS device) was displayed horizontally, because of the orientation data of the exif that the jpg file possesses, which should be shown vertically, which is also the reason why I still think that the particular picture still has exif data.

I tried below from your advice and found the orientation of the exif is "undefined" which should be ok to be shown vertically.

Do you know anything about what the orientation data of the exif should be in "this particular case" after mogrify command line eliminated the exif?

[root@server-1035657-1 ~]# identify -verbose /var/www/vhosts/xxxxxxx.com/httpdocs/upload/save_image/11152117_5a0c30744cbc8.
jpg
Image: /var/www/vhosts/xxxxxxx.com/httpdocs/upload/save_image/11152117_5a0c30744cbc8.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Class: DirectClass
Geometry: 130x97+0+0
Resolution: 72x72
Print size: 1.80556x1.34722
Units: PixelsPerInch
Type: TrueColor
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
Red:
min: 9 (0.0352941)
max: 255 (1)
mean: 130.273 (0.510873)
standard deviation: 52.3928 (0.205462)
kurtosis: -0.538754
skewness: 0.426604
Green:
min: 3 (0.0117647)
max: 243 (0.952941)
mean: 115.347 (0.45234)
standard deviation: 41.7208 (0.163611)
kurtosis: -0.0108319
skewness: 0.438553
Blue:
min: 0 (0)
max: 238 (0.933333)
mean: 105.13 (0.412273)
standard deviation: 43.3074 (0.169833)
kurtosis: -0.0583061
skewness: 0.543916
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 116.916 (0.458495)
standard deviation: 46.0477 (0.180579)
kurtosis: 0.226776
skewness: 0.592646
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: black
Compose: Over
Page geometry: 130x97+0+0
Dispose: Undefined
Iterations: 0
Compression: JPEG
Quality: 75
Orientation: Undefined
Properties:
date:create: 2017-11-16T07:56:16+09:00
date:modify: 2017-11-16T07:56:16+09:00
jpeg:colorspace: 2
jpeg:sampling-factor: 2x2,1x1,1x1
signature: fd911a00222b258e23eb89df7e70ddeb690b92d6e75d71ae939604178d572284
Artifacts:
verbose: true
Tainted: False
Filesize: 4.13KBB
Number pixels: 12.6KB
Pixels per second: 126.1TB
User time: 0.000u
Elapsed time: 0:01.000
Version: ImageMagick 6.7.2-7 2017-03-22 Q16 http://www.imagemagick.org

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

Posted: 2017-11-15T19:12:34-07:00
by fmw42
Is this your original JPG or after you did -strip?

I have an image that has the following meta data pertaining to EXIF:

Code: Select all

 Orientation: TopLeft
  Properties:
    date:create: 2017-11-15T18:07:57-08:00
    date:modify: 2009-12-05T16:59:52-08:00
    exif:ColorSpace: 1
    exif:ComponentsConfiguration: 1, 2, 3, 0
    exif:CompressedBitsPerPixel: 4/1
    exif:Contrast: 0
    exif:CustomRendered: 0
    exif:DateTime: 2009:12:05 16:59:51
    exif:DateTimeDigitized: 2009:12:05 16:59:51
    exif:DateTimeOriginal: 2009:12:05 16:59:51
    exif:DigitalZoomRatio: 0/10
    exif:ExifImageLength: 2448
    exif:ExifImageWidth: 3264
    exif:ExifOffset: 420
    exif:ExifVersion: 48, 50, 50, 48
    exif:ExposureBiasValue: 0/100
    exif:ExposureMode: 0
    exif:ExposureProgram: 2
    exif:ExposureTime: 10/80
    exif:FileSource: 3
    exif:Flash: 16
    exif:FlashPixVersion: 48, 49, 48, 48
    exif:FNumber: 28/10
    exif:FocalLength: 74/10
    exif:FocalLengthIn35mmFilm: 35
    exif:GainControl: 1
    exif:InteroperabilityOffset: 6652
    exif:ISOSpeedRatings: 200
    exif:LightSource: 0
    exif:Make: Panasonic
    exif:MakerNote: 80, 97, 110, 97, 115, 111, 110, 105, 99, 0, 0, 0, 30, 0, 1, 0, 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 7, 0, 4, 0, 0, 0, 0, 1, 0, 19, 3, 0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 7, 0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 15, 0, 1, 0, 2, 0, 0, 0, 16, 0, 0, 0, 26, 0, 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, 28, 0, 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 32, 0, 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, 33, 0, 7, 0, 192, 20, 0, 0, 16, 5, 0, 0, 34, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 35, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 36, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 37, 0, 7, 0, 16, 0, 0, 0, 208, 25, 0, 0, 38, 0, 7, 0, 4, 0, 0, 0, 48, 49, 48, 52, 39, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 40, 0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 41, 0, 4, 0, 1, 0, 0, 0, 62, 52, 0, 0, 42, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 43, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 44, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 45, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 46, 0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 47, 0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 48, 0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 49, 0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 50, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 51, 0, 2, 0, 20, 0, 0, 0, 224, 25, 0, 0, 52, 0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 53, 0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 68, 86, 1, 2, 69, 80, 0, 0, 240, 63, 68, 66, 224, 3, 240, 63, 65, 70, 178, 0, 96, 71, 136, 208, 98, 71, 37, 2, 100, 71, 0, 0, 102, 71, 0, 0, 78, 71, 108, 0, 114, 71, 7, 0, 116, 71, 2, 0, 122, 71, 3, 0, 124, 71, 252, 255, 126, 71, 0, 0, 64, 71, 85, 5, 66, 71, 44, 12, 76, 71, 156, 14, 240, 71, 116, 13, 242, 71, 197, 15, 92, 71, 43, 0, 118, 71, 0, 1, 120, 71, 96, 0, 82, 71, 143, 0, 86, 71, 40, 0, 84, 71, 152, 0, 108, 71, 72, 1, 112, 71, 221, 0, 110, 71, 91, 2, 88, 71, 217, 0, 158, 71, 122, 0, 156, 71, 199, 4, 140, 71, 0, 0, 142, 71, 2, 2, 138, 71, 31, 12, 144, 71, 0, 0, 146, 71, 1, 0, 148, 71, 1, 0, 150, 71, 0, 0, 152, 71, 26, 0, 154, 71, 26, 0, 222, 70, 40, 21, 238, 71, 0, 0, 90, 71, 0, 0, 138, 89, 0, 0, 140, 89, 0, 0, 4, 70, 26, 0, 10, 70, 44, 12, 240, 63, 83, 84, 74, 0, 164, 70, 0, 0, 166, 70, 0, 0, 168, 70, 0, 0, 170, 70, 0, 0, 172, 70, 0, 0, 250, 71, 0, 0, 174, 70, 0, 0, 176, 70, 0, 0, 182, 70, 0, 0, 184, 70, 0, 0, 186, 70, 0, 0, 244, 71, 0, 0, 246, 71, 0, 0, 178, 70, 0, 0, 180, 70, 0, 0, 176, 68, 0, 0, 178, 68, 0, 0, 240, 63, 65, 69, 214, 0, 60, 69, 8, 0, 20, 69, 57, 1, 234, 70, 57, 1, 236, 70, 53, 1, 40, 69, 56, 1, 44, 69, 225, 1, 36, 69, 178, 3, 16, 69, 117, 2, 18, 69, 151, 2, 32, 69, 107, 1, 54, 69, 178, 1, 34, 69, 96, 1, 58, 69, 1, 0, 232, 71, 1, 0, 59, 69, 1, 0, 233, 71, 0, 0, 38, 69, 11, 0, 42, 69, 11, 0, 192, 70, 0, 0, 194, 70, 0, 0, 200, 89, 147, 1, 198, 89, 134, 1, 82, 69, 128, 2, 80, 69, 134, 1, 67, 69, 0, 0, 62, 69, 3, 0, 28, 69, 1, 2, 68, 69, 141, 0, 34, 74, 49, 1, 192, 89, 1, 0, 193, 89, 0, 0, 232, 70, 206, 75, 204, 70, 0, 0, 212, 70, 0, 1, 206, 70, 0, 0, 208, 70, 0, 0, 214, 70, 0, 0, 80, 88, 0, 0, 218, 70, 0, 0, 197, 89, 0, 0, 74, 69, 1, 0, 76, 69, 1, 0, 78, 69, 1, 0, 239, 70, 1, 0, 212, 89, 0, 0, 214, 89, 138, 67, 216, 89, 198, 51, 218, 89, 233, 17, 220, 89, 5, 0, 238, 70, 0, 0, 236, 89, 0, 0, 234, 71, 0, 0, 240, 63, 87, 66, 14, 1, 0, 68, 17, 1, 2, 68, 220, 2, 92, 68, 31, 1, 4, 68, 144, 0, 6, 68, 136, 0, 18, 69, 151, 2, 26, 68, 97, 0, 94, 68, 14, 0, 95, 68, 8, 0, 18, 68, 144, 0, 20, 68, 136, 0, 22, 68, 166, 1, 24, 68, 42, 1, 204, 68, 14, 1, 206, 68, 50, 2, 208, 68, 126, 1, 210, 68, 84, 1, 220, 68, 201, 1, 222, 68, 70, 1, 180, 68, 0, 5, 182, 68, 0, 0, 48, 68, 103, 0, 56, 68, 126, 0, 50, 68, 117, 0, 58, 68, 120, 0, 52, 68, 240, 255, 60, 68, 24, 0, 54, 68, 40, 0, 62, 68, 112, 0, 76, 68, 141, 0, 78, 68, 125, 0, 192, 68, 141, 0, 194, 68, 125, 0, 234, 68, 0, 0, 128, 69, 14, 0, 130, 69, 70, 0, 131, 69, 62, 0, 132, 69, 0, 0, 134, 69, 0, 0, 135, 69, 0, 0, 136, 69, 0, 0, 138, 69, 0, 0, 139, 69, 0, 0, 140, 69, 0, 0, 142, 69, 155, 0, 143, 69, 126, 0, 144, 69, 0, 0, 146, 69, 0, 0, 147, 69, 0, 0, 82, 68, 122, 0, 84, 68, 136, 0, 86, 68, 144, 0, 88, 68, 136, 0, 212, 68, 162, 0, 214, 68, 179, 0, 216, 68, 122, 0, 218, 68, 136, 0, 212, 93, 0, 0, 240, 68, 0, 0, 242, 68, 0, 0, 244, 68, 0, 0, 246, 68, 0, 0, 248, 68, 0, 0, 250, 68, 0, 0, 252, 68, 0, 0, 254, 68, 0
    exif:MaxApertureValue: 30/10
    exif:MeteringMode: 5
    exif:Model: DMC-FZ30
    exif:Orientation: 1
    exif:PrintImageMatching: 80, 114, 105, 110, 116, 73, 77, 0, 48, 50, 53, 48, 0, 0, 14, 0, 1, 0, 22, 0, 22, 0, 2, 0, 0, 0, 0, 0, 3, 0, 100, 0, 0, 0, 7, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 11, 0, 172, 0, 0, 0, 12, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 14, 0, 196, 0, 0, 0, 0, 1, 5, 0, 0, 0, 1, 1, 1, 0, 0, 0, 16, 1, 128, 0, 0, 0, 9, 17, 0, 0, 16, 39, 0, 0, 11, 15, 0, 0, 16, 39, 0, 0, 151, 5, 0, 0, 16, 39, 0, 0, 176, 8, 0, 0, 16, 39, 0, 0, 1, 28, 0, 0, 16, 39, 0, 0, 94, 2, 0, 0, 16, 39, 0, 0, 139, 0, 0, 0, 16, 39, 0, 0, 203, 3, 0, 0, 16, 39, 0, 0, 229, 27, 0, 0, 16, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
    exif:ResolutionUnit: 2
    exif:Saturation: 0
    exif:SceneCaptureType: 0
    exif:SceneType: 1
    exif:SensingMethod: 2
    exif:Sharpness: 0
    exif:Software: Ver.1.0  
    exif:thumbnail:Compression: 6
    exif:thumbnail:InteroperabilityIndex: R98
    exif:thumbnail:InteroperabilityVersion: 48, 49, 48, 48
    exif:thumbnail:JPEGInterchangeFormat: 6804
    exif:thumbnail:JPEGInterchangeFormatLength: 7873
    exif:thumbnail:Orientation: 1
    exif:thumbnail:ResolutionUnit: 2
    exif:thumbnail:XResolution: 72/1
    exif:thumbnail:YCbCrPositioning: 2
    exif:thumbnail:YResolution: 72/1
    exif:WhiteBalance: 0
    exif:XResolution: 72/1
    exif:YCbCrPositioning: 2
    exif:YResolution: 72/1
    jpeg:colorspace: 2
    jpeg:sampling-factor: 2x1,1x1,1x1
    signature: c2fb18ec513c5f151716b4aa1a309ddf037e48c7339b56f165c02c33152f8bff
  Profiles:
    Profile-exif: 27292 bytes
After doing

mogrify -strip P1050001.JPG

identify -verbose shows:

Code: Select all

  Orientation: Undefined
  Properties:
    date:create: 2017-11-15T18:10:16-08:00
    date:modify: 2017-11-15T18:10:16-08:00
    jpeg:colorspace: 2
    jpeg:sampling-factor: 2x1,1x1,1x1
    signature: 14e39195025d27da273ced9671084f08759064e4beba6ff9c357c035cc4d502b
So it is typical of ImageMagick to show undefined for orientation after you strip the meta data. Once the EXIF orientation is removed, ImageMagick can no longer know what it was, which it had originally copied to its Orientation field.


By the way your version of ImageMagick is 6.7.2-7 2017-03-22. That means it is very old, but has been patched. The patch date is from March of this year. Perhaps you should check if there are any newer patches.

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

Posted: 2017-11-16T03:08:30-07:00
by PleskQuestion
fmw42,

Thanks for your time.

The data I showed you was the one after I run mogrify -strip command. (Do you think that the jpg file is not containing exif data anymore? If it does not contain exif data anymore, then I wonder why the picture is still displayed horizontally.)

Before I decide to reinstall ImageMagick for a newer version or install EXIFTOOL to test again, I have to find how exif data differ before and after running mogrify –strip for new jpg file.

** So, how can I get "meta data pertaining to EXIF", the first data that you showed me to know exif data in detail?

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

Posted: 2017-11-16T10:18:32-07:00
by fmw42
Show us the data before you used strip. Perhaps the orientation was already correct. Or post and example JPG for which you are having trouble so we can test that.
** So, how can I get "meta data pertaining to EXIF", the first data that you showed me to know exif data in detail?
I do not understand this question. You can use

Code: Select all

identify -verbose yourimage.jpg 
or

Code: Select all

identify -format "%[EXIF:*]" yourimage.jpg
or use EXIFTOOL.

to get the EXIF information. See http://www.imagemagick.org/script/escape.php

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

Posted: 2017-11-16T18:35:14-07:00
by PleskQuestion
fmw42,

Thank you for your time.

>Show us the data before you used strip. Perhaps the orientation was already correct.

Then, why do you think that the picture was displayed horizontally which should be vertically when the orientation was already correct.

http://metown.info/products/detail.php? ... yname=test

* I've not used strip command yet for the picture above.

Sorry for being a foreign site.(URL contains double byte characters、and I'm not sure your os allows it.) This picture was taken vertically from iOS device and is displayed vertically in the iOS device, but once I upload to the demo site that I am developing now it will be displayed horizontally which is the reason why I think the orientation was added by iOS device.(This phenomenon never happen to the picture taken from android device, and exif orientation issue is famous for iOS device. )

What should I do in the end if the original data does not even contain orientation like your guess, yet it is displayed horizontally which was initially taken vertically?

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

Posted: 2017-11-16T19:03:33-07:00
by fmw42
Since I do not read the language on that site, I am not sure how to download it. I clicked on the picture and chose download file. But I may have only downloaded the preview file. Also note that some hosting service reformat the image. So it might be better if you do the following on your original file and show the results. When I do it the file has no orientation and no EXIF data.

Code: Select all

identify -verbose 11170932_5a0e2e398f92f.jpg
  Image: 11170932_5a0e2e398f92f.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Mime type: image/jpeg
  Class: DirectClass
  Geometry: 800x600+0+0
  Units: Undefined
  Type: TrueColor
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Pixels: 480000
    Red:
      min: 0  (0)
      max: 255 (1)
      mean: 105.146 (0.412337)
      standard deviation: 70.8483 (0.277836)
      kurtosis: -0.930558
      skewness: 0.273743
      entropy: 0.941225
    Green:
      min: 0  (0)
      max: 255 (1)
      mean: 66.2859 (0.259945)
      standard deviation: 45.3036 (0.177661)
      kurtosis: 3.56728
      skewness: 1.53964
      entropy: 0.878127
    Blue:
      min: 0  (0)
      max: 255 (1)
      mean: 44.2376 (0.173481)
      standard deviation: 24.872 (0.0975373)
      kurtosis: 16.2904
      skewness: 2.76409
      entropy: 0.774701
  Image statistics:
    Overall:
      min: 255  (1)
      max: 0 (0)
      mean: 183.11 (0.718079)
      standard deviation: 56.5465 (0.221751)
      kurtosis: 1.25679
      skewness: 1.31531
      entropy: 0.864685
  Rendering intent: Perceptual
  Gamma: 0.454545
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Background color: white
  Border color: srgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 800x600+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 75
  Orientation: Undefined
  Properties:
    comment: CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality

    date:create: 2017-11-16T18:00:20-08:00
    date:modify: 2017-11-16T18:00:20-08:00
    jpeg:colorspace: 2
    jpeg:sampling-factor: 2x2,1x1,1x1
    signature: d97b8ebcf53620cfed4737101b30fa5f6e26afb0decdeff50d03ae95291da594
  Artifacts:
    filename: 11170932_5a0e2e398f92f.jpg
    verbose: true
  Tainted: False
  Filesize: 73951B
  Number pixels: 480000
  Pixels per second: 48MB
  User time: 0.010u
  Elapsed time: 0:01.009
  Version: ImageMagick 6.9.9-23 Q16 x86_64 2017-11-12 http://www.imagemagick.org

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

Posted: 2017-11-16T19:36:23-07:00
by PleskQuestion
fmw42,

Thanks. Sorry again.

Again, this only happen to the picture taken from iOS, not Android(hosting service has nothing to do with these different os). Since orientation is not the one that is causing the problem, what is causing this?

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

Posted: 2017-11-16T21:52:47-07:00
by fmw42
Perhaps I don't understand the issue. You said you were not getting the correct orientation. If the orientation is undefined, then that could happen, if there was a different orientation, but it was stripped from the image meta data. Again, I would need to be able to download the original image to see what is happening.

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

Posted: 2017-11-18T05:14:12-07:00
by PleskQuestion
Fmw42 Thanks for your time. I really appreciate it.

The link below is the site that shows the original image, the one without strip and without uploading to the application. (I just sent the image to the web server from iPhone via FTTTP)

http://metown.info/upload/save_image/595.JPG

You can download the original image by clicking the 4th link from the bottom after you left-click the mouse. (Isn't it what you want? If it's not, should I send you the image?)

When I run commad I had results like below. Can you tell why the image is displayed horizontally which was initially taken vertically by seeing exif data?

[root@server-xxxxxx-x ~]# identify -verbose /var/www/vhosts/xxxxxxx.com/httpdocs/upload/save_image/595.JPG
Image: /var/www/vhosts/metown.info/httpdocs/upload/save_image/595.JPG
Format: JPEG (Joint Photographic Experts Group JFIF format)
Class: DirectClass
Geometry: 3264x2448+0+0
Resolution: 72x72
Print size: 45.3333x34
Units: PixelsPerInch
Type: TrueColor
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
Red:
min: 0 (0)
max: 255 (1)
mean: 131.441 (0.515453)
standard deviation: 58.6368 (0.229948)
kurtosis: -0.621384
skewness: 0.432849
Green:
min: 0 (0)
max: 255 (1)
mean: 116.345 (0.456256)
standard deviation: 47.7496 (0.187253)
kurtosis: -0.464829
skewness: 0.330924
Blue:
min: 0 (0)
max: 254 (0.996078)
mean: 106.126 (0.416181)
standard deviation: 49.4675 (0.19399)
kurtosis: -0.520016
skewness: 0.468604
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 117.971 (0.46263)
standard deviation: 52.1707 (0.204591)
kurtosis: -0.128344
skewness: 0.520354
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: black
Compose: Over
Page geometry: 3264x2448+0+0
Dispose: Undefined
Iterations: 0
Compression: JPEG
Quality: 96
Orientation: TopLeft
Properties:
date:create: 2017-11-18T15:36:25+09:00
date:modify: 2017-11-18T15:36:25+09:00
exif:ApertureValue: 7983/3509
exif:BrightnessValue: 7549/998
exif:ColorSpace: 1
exif:ComponentsConfiguration: 1, 2, 3, 0
exif:Compression: 6
exif:DateTime: 2017:11:18 15:02:08
exif:DateTimeDigitized: 2017:09:13 13:45:06
exif:DateTimeOriginal: 2017:09:13 13:45:06
exif:DigitalZoomRatio: 102/41
exif:ExifImageLength: 3264
exif:ExifImageWidth: 2448
exif:ExifOffset: 2314
exif:ExifVersion: 48, 50, 50, 49
exif:ExposureBiasValue: 0/1
exif:ExposureMode: 0
exif:ExposureProgram: 2
exif:ExposureTime: 1/247
exif:Flash: 24
exif:FlashPixVersion: 48, 49, 48, 48
exif:FNumber: 11/5
exif:FocalLength: 83/20
exif:FocalLengthIn35mmFilm: 72
exif:GPSAltitude: 56351/2048
exif:GPSAltitudeRef: 0
exif:GPSDateStamp: 2017:09:13
exif:GPSDestBearing: 85700/249
exif:GPSDestBearingRef: M
exif:GPSImgDirection: 85700/249
exif:GPSImgDirectionRef: M
exif:GPSInfo: 5810
exif:GPSLatitude: 40/1, 30/1, 2556/100
exif:GPSLatitudeRef: N
exif:GPSLongitude: 141/1, 26/1, 1698/100
exif:GPSLongitudeRef: E
exif:GPSSpeed: 0/1
exif:GPSSpeedRef: K
exif:GPSTimeStamp: 4/1, 45/1, 500/100
exif:ISOSpeedRatings: 32
exif:JPEGInterchangeFormat: 6216
exif:JPEGInterchangeFormatLength: 5983
exif:Make: Apple
exif:MakerNote: 65, 112, 112, 108, 101, 32, 105, 79, 83, 0, 0, 1, 77, 77, 0, 10, 0, 1, 0, 9, 0, 0, 0, 1, 0, 0, 0, 5, 0, 2, 0, 7, 0, 0, 2, 46, 0, 0, 0, 140, 0, 3, 0, 7, 0, 0, 0, 104, 0, 0, 2, 186, 0, 4, 0, 9, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 0, 9, 0, 0, 0, 1, 0, 0, 0, 190, 0, 6, 0, 9, 0, 0, 0, 1, 0, 0, 0, 191, 0, 7, 0, 9, 0, 0, 0, 1, 0, 0, 0, 1, 0, 8, 0, 10, 0, 0, 0, 3, 0, 0, 3, 34, 0, 14, 0, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 20, 0, 9, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 98, 112, 108, 105, 115, 116, 48, 48, 79, 17, 2, 0, 159, 0, 117, 1, 232, 0, 13, 1, 29, 1, 43, 1, 2, 1, 211, 0, 200, 0, 211, 0, 202, 0, 200, 0, 239, 0, 16, 1, 113, 1, 37, 1, 160, 0, 145, 1, 10, 1, 6, 1, 16, 1, 43, 1, 1, 1, 239, 0, 215, 0, 193, 0, 201, 0, 225, 0, 208, 0, 219, 0, 53, 1, 55, 1, 140, 0, 132, 1, 70, 1, 14, 1, 241, 0, 21, 1, 241, 0, 230, 0, 212, 0, 195, 0, 198, 0, 201, 0, 217, 0, 245, 0, 251, 0, 7, 1, 81, 0, 115, 1, 37, 1, 241, 0, 214, 0, 237, 0, 242, 0, 222, 0, 190, 0, 193, 0, 201, 0, 205, 0, 205, 0, 216, 0, 243, 0, 29, 1, 78, 0, 68, 1, 16, 1, 234, 0, 190, 0, 19, 1, 246, 0, 226, 0, 178, 0, 145, 0, 180, 0, 173, 0, 190, 0, 185, 0, 222, 0, 44, 1, 100, 0, 23, 1, 2, 1, 218, 0, 184, 0, 226, 0, 237, 0, 216, 0, 192, 0, 189, 0, 193, 0, 182, 0, 172, 0, 154, 0, 183, 0, 243, 0, 180, 0, 221, 0, 255, 0, 226, 0, 224, 0, 245, 0, 221, 0, 190, 0, 185, 0, 181, 0, 183, 0, 177, 0, 187, 0, 143, 0, 153, 0, 176, 0, 188, 0, 22, 1, 240, 0, 213, 0, 224, 0, 175, 0, 185, 0, 136, 0, 167, 0, 165, 0, 168, 0, 169, 0, 177, 0, 149, 0, 157, 0, 172, 0, 148, 0, 240, 0, 254, 0, 5, 1, 175, 0, 173, 0, 143, 0, 126, 0, 181, 0, 180, 0, 171, 0, 160, 0, 163, 0, 146, 0, 145, 0, 162, 0, 10, 1, 235, 0, 226, 0, 212, 0, 173, 0, 225, 0, 221, 0, 169, 0, 135, 0, 130, 0, 200, 0, 156, 0, 164, 0, 156, 0, 144, 0, 151, 0, 238, 0, 168, 0, 246, 0, 207, 0, 185, 0, 156, 0, 186, 0, 149, 0, 215, 0, 206, 0, 119, 0, 106, 0, 149, 0, 160, 0, 141, 0, 153, 0, 38, 1, 17, 1, 197, 0, 2, 1, 179, 0, 107, 0, 211, 0, 162, 0, 201, 0, 154, 0, 133, 0, 122, 0, 123, 0, 138, 0, 142, 0, 162, 0, 251, 0, 226, 0, 146, 0, 227, 0, 188, 0, 116, 0, 105, 0, 135, 0, 148, 0, 146, 0, 125, 0, 124, 0, 100, 0, 107, 0, 126, 0, 146, 0, 189, 1, 56, 1, 13, 1, 197, 0, 4, 1, 112, 0, 149, 0, 147, 0, 144, 0, 184, 0, 162, 0, 195, 0, 109, 0, 102, 0, 112, 0, 126, 0, 122, 2, 64, 1, 140, 1, 18, 1, 31, 1, 247, 0, 216, 0, 169, 0, 129, 0, 176, 0, 130, 0, 119, 0, 96, 0, 100, 0, 130, 0, 124, 0, 206, 2, 251, 1, 234, 1, 62, 1, 43, 1, 21, 1, 219, 0, 187, 0, 192, 0, 153, 0, 128, 0, 114, 0, 107, 0, 90, 0, 124, 0, 104, 0, 0, 8, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 12, 98, 112, 108, 105, 115, 116, 48, 48, 212, 1, 2, 3, 4, 5, 6, 7, 8, 85, 102, 108, 97, 103, 115, 85, 118, 97, 108, 117, 101, 85, 101, 112, 111, 99, 104, 89, 116, 105, 109, 101, 115, 99, 97, 108, 101, 16, 1, 19, 0, 1, 49, 242, 34, 231, 37, 56, 16, 0, 18, 59, 154, 202, 0, 8, 17, 23, 29, 35, 45, 47, 56, 58, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 231, 0, 0, 28, 76, 255, 255, 249, 108, 0, 0, 7, 9, 255, 255, 253, 62, 0, 0, 7, 209
exif:MeteringMode: 5
exif:Model: iPhone 6
exif:Orientation: 1
exif:ResolutionUnit: 2
exif:SceneCaptureType: 0
exif:SceneType: 1
exif:SensingMethod: 2
exif:ShutterSpeedValue: 6693/842
exif:Software: Microsoft Windows Photo Viewer 10.0.14393.0
exif:SubjectArea: 1625, 1217, 1794, 1070
exif:SubSecTimeDigitized: 065
exif:SubSecTimeOriginal: 065
exif:WhiteBalance: 0
exif:XResolution: 72/1
exif:YCbCrPositioning: 1
exif:YResolution: 72/1
jpeg:colorspace: 2
jpeg:sampling-factor: 2x2,1x1,1x1
signature: 74c80baf5b835f15697529db827e6aca2231ce0660d191843f7d99c1c157fd9f
unknown: 83/20, 83/20, 11/5, 11/5
xmp:CreatorTool: Microsoft Windows Photo Viewer 10.0.14393.0
Profiles:
Profile-exif: 12206 bytes
Profile-xmp: 12693 bytes
Artifacts:
verbose: true
Tainted: False
Filesize: 2.105MBB
Number pixels: 7.99MB
Pixels per second: 72.64MB
User time: 0.100u
Elapsed time: 0:01.110
Version: ImageMagick 6.7.2-7 2017-03-22 Q16 http://www.imagemagick.org