Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotation issue #532

Closed
Merk87 opened this issue Dec 2, 2014 · 39 comments
Closed

Rotation issue #532

Merk87 opened this issue Dec 2, 2014 · 39 comments
Labels
State: Reviewing This item is being reviewed to determine if it should be accepted.

Comments

@Merk87
Copy link

Merk87 commented Dec 2, 2014

Hello.

I'm experiencing a weird bug.
I'm using the thumbnail filters and when my users upload a picture for example this one:
pic

Automatically is rotated... I've checked the exif data for this one and in orientation I found
Orientation Rotate 90 CW
So, I'm guessing that the bundle is taking the orientation on the exif data and applying automatically, but this behaviour can be deactivated? Because in this case this image is vertical but after uploading it, the thumbnail is displayed as landscape...

Thanks!

Edit --> After updating the picture here, is also rotated.

@digitalkaoz
Copy link
Contributor

you could use the autorotate filter which should fix this issue

@trsteel88
Copy link
Contributor

Also, make sure you don't run the strip filter before autorotate or it will remove the meta that tells the filter which direction it should be rotated to.

@Merk87
Copy link
Author

Merk87 commented Jan 28, 2015

Nothing I'm still having the same problem... this is my config, because I don't know what else try...

liip_imagine:
    driver:         imagick
    cache_prefix:   /uploads/cache
    filter_sets:
        profile_view:
            quality: 80
            filters:
                autorotate: ~
                strip: ~
                thumbnail: { size: [178, 178], mode: outbound }

@trsteel88
Copy link
Contributor

The meta on the image may be forcing it to rotate to what you see. Try it without (you will need to clear your media cache)

@Merk87
Copy link
Author

Merk87 commented Jan 28, 2015

@trsteel88 sorry for my ignorance about this, but what you mean when say to clear media cache?

@trsteel88
Copy link
Contributor

When an image is loaded it creates a cache in /web/media/cache - You will need to clear that cache if you want to see image based on your latest config.

@Merk87
Copy link
Author

Merk87 commented Jan 28, 2015

Ah, yes I always delete the cache when I change the config, but still no working. Anyway thanks very much for your help.

@bocharsky-bw
Copy link
Contributor

@digitalkaoz The auto rotate filter's name is auto_rotate, it pointed in docs
@Merk87 Try to use auto_rotate filter instead of autorotate?

@anaelChardan
Copy link

I've got the same problem after upload my Pictures are autorotate by the bundle even if I add the autorotate filter, have you fix it ?

@Merk87
Copy link
Author

Merk87 commented Apr 17, 2015

No, but the other day I found the problem. The previous developer (who installed the bundle) use and old version of the liip bundle...

@anaelChardan
Copy link

So, in your opinion, using an old version of this bundle is the only solution ? ^^

@Merk87
Copy link
Author

Merk87 commented Apr 17, 2015

Nope, using an old version is the problem! the autorotate filter is called auto_rotate, check your configs.

@anaelChardan
Copy link

I think that i'm using the latest version, there is my config :

my_portfolio:
filters:
auto_rotate: ~
relative_resize: { scale: 0.5 } # Transforms 50x40 to 32x26

the auto_rotate doesn't work at time.

And there is the config of the bundle into my composer.json : "liip/imagine-bundle": "~1.2"

@digitalkaoz
Copy link
Contributor

Dump the exif Data of the File here, and we may find the Problem

anaelChardan [email protected] schrieb am Fr., 17. Apr. 2015 15:18:

I think that i'm using the latest version, there is my config :

my_portfolio:
filters:
auto_rotate: ~
relative_resize: { scale: 0.5 } # Transforms 50x40 to 32x26

the auto_rotate doesn't work at time.

And there is the config of the bundle into my composer.json :
"liip/imagine-bundle": "~1.2"


Reply to this email directly or view it on GitHub
#532 (comment)
.

@anaelChardan
Copy link

Hum, can you help me to do that please ? :)

@digitalkaoz
Copy link
Contributor

http://mikebeach.org/2011/12/17/how-to-retrieve-exif-data-from-the-command-line-in-ubuntu-linux/

anaelChardan [email protected] schrieb am Fr., 17. Apr. 2015 18:04:

Hum, can you help me to do that please ? :)


Reply to this email directly or view it on GitHub
#532 (comment)
.

@anaelChardan
Copy link

Here is an example :

exif:ApertureValue: 227/100
exif:BrightnessValue: 973/100
exif:ColorSpace: 1
exif:ComponentsConfiguration: 1, 2, 3, 0
exif:DateTime: 2015:04:01 20:03:29
exif:DateTimeDigitized: 2015:04:01 20:03:29
exif:DateTimeOriginal: 2015:04:01 20:03:29
exif:ExifImageLength: 3096
exif:ExifImageWidth: 4128
exif:ExifOffset: 237
exif:ExifVersion: 48, 50, 50, 48
exif:ExposureBiasValue: 0/10
exif:ExposureMode: 0
exif:ExposureProgram: 2
exif:ExposureTime: 1/2824
exif:Flash: 0
exif:FlashPixVersion: 48, 49, 48, 48
exif:FNumber: 220/100
exif:FocalLength: 413/100
exif:FocalLengthIn35mmFilm: 31
exif:GPSDateStamp: 2015:04:01
exif:GPSImgDirection: 95/1
exif:GPSImgDirectionRef: M
exif:GPSInfo: 2951
exif:GPSTimeStamp: 18/1, 3/1, 28/1
exif:GPSVersionID: 2, 2, 0, 0
exif:ImageLength: 3096
exif:ImageWidth: 4128
exif:InteroperabilityIndex: R98
exif:InteroperabilityOffset: 2921
exif:InteroperabilityVersion: 48, 49, 48, 48
exif:ISOSpeedRatings: 50
exif:LightSource: 0
exif:Make: SAMSUNG
exif:MakerNote: 7, 0, 1, 0, 7, 0, 4, 0, 0, 0, 48, 49, 48, 48, 2, 0, 4, 0, 1, 0, 0, 0, 0, 32, 1, 0, 12, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, 0, 5, 0, 1, 0, 0, 0, 90, 0, 0, 0, 64, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 80, 0, 4, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
exif:MaxApertureValue: 228/100
exif:MeteringMode: 2
exif:Model: SM-N9005
exif:Orientation: 6
exif:ResolutionUnit: 2
exif:SceneCaptureType: 0
exif:SceneType: 1
exif:SensingMethod: 2
exif:ShutterSpeedValue: 1146/100
exif:Software: N9005XXUGBNL8
exif:UserComment: 65, 83, 67, 73, 73, 0, 0, 0, 10, 0, 0, 0, 74, 75, 74, 75, 39, 8, 170, 60, 247, 3, 1, 0, 150, 4, 1, 0, 0, 0, 0, 0, 220, 218, 1, 0, 0, 0, 1, 0, 34, 131, 1, 0, 0, 0, 0, 0, 0, 119, 11, 0, 0, 0, 4, 0, 0, 187, 9, 0, 184, 21, 0, 0, 90, 248, 1, 0, 0, 0, 1, 0, 250, 141, 1, 0, 85, 248, 1, 0, 0, 0, 1, 0, 186, 142, 1, 0, 45, 236, 1, 0, 38, 251, 254, 255, 173, 24, 0, 0, 97, 186, 255, 255, 107, 153, 1, 0, 52, 172, 255, 255, 97, 2, 0, 0, 205, 36, 255, 255, 210, 216, 1, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 145, 17, 1, 0, 146, 153, 9, 0, 146, 153, 9, 0, 146, 153, 9, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 146, 153, 9, 0, 146, 153, 9, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 146, 153, 9, 0, 146, 153, 9, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 146, 153, 9, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 146, 153, 9, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 146, 153, 9, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 17, 34, 2, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 1, 34, 2, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 17, 34, 2, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 16, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 1, 34, 2, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 1, 34, 2, 0, 0, 17, 1, 0, 1, 34, 2, 0, 0, 17, 1, 0, 16, 17, 1, 0, 1, 34, 2, 0, 16, 17, 1, 0, 17, 34, 2, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 164, 252, 1, 0, 28, 0, 1, 0, 79, 142, 1, 0, 182, 243, 1, 0, 238, 255, 0, 0, 229, 151, 1, 0, 0, 0
exif:WhiteBalance: 0
exif:XResolution: 72/1
exif:YCbCrPositioning: 1
exif:YResolution: 72/1
Profile-exif: 17375 bytes

@digitalkaoz
Copy link
Contributor

Mh regarding

exif:Orientation: 6

It should rotate 90°

Isnt that correct?

anaelChardan [email protected] schrieb am Sa., 18. Apr. 2015 19:29:

Here is an example :

exif:ApertureValue: 227/100
exif:BrightnessValue: 973/100
exif:ColorSpace: 1
exif:ComponentsConfiguration: 1, 2, 3, 0
exif:DateTime: 2015:04:01 20:03:29
exif:DateTimeDigitized: 2015:04:01 20:03:29
exif:DateTimeOriginal: 2015:04:01 20:03:29
exif:ExifImageLength: 3096
exif:ExifImageWidth: 4128
exif:ExifOffset: 237
exif:ExifVersion: 48, 50, 50, 48
exif:ExposureBiasValue: 0/10
exif:ExposureMode: 0
exif:ExposureProgram: 2
exif:ExposureTime: 1/2824
exif:Flash: 0
exif:FlashPixVersion: 48, 49, 48, 48
exif:FNumber: 220/100
exif:FocalLength: 413/100
exif:FocalLengthIn35mmFilm: 31
exif:GPSDateStamp: 2015:04:01
exif:GPSImgDirection: 95/1
exif:GPSImgDirectionRef: M
exif:GPSInfo: 2951
exif:GPSTimeStamp: 18/1, 3/1, 28/1
exif:GPSVersionID: 2, 2, 0, 0
exif:ImageLength: 3096
exif:ImageWidth: 4128
exif:InteroperabilityIndex: R98
exif:InteroperabilityOffset: 2921
exif:InteroperabilityVersion: 48, 49, 48, 48
exif:ISOSpeedRatings: 50
exif:LightSource: 0
exif:Make: SAMSUNG
exif:MakerNote: 7, 0, 1, 0, 7, 0, 4, 0, 0, 0, 48, 49, 48, 48, 2, 0, 4, 0, 1, 0, 0, 0, 0, 32, 1, 0, 12, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, 0, 5, 0, 1, 0, 0, 0, 90, 0, 0, 0, 64, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 80, 0, 4, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
exif:MaxApertureValue: 228/100
exif:MeteringMode: 2
exif:Model: SM-N9005
exif:Orientation: 6
exif:ResolutionUnit: 2
exif:SceneCaptureType: 0
exif:SceneType: 1
exif:SensingMethod: 2
exif:ShutterSpeedValue: 1146/100
exif:Software: N9005XXUGBNL8
exif:UserComment: 65, 83, 67, 73, 73, 0, 0, 0, 10, 0, 0, 0, 74, 75, 74, 75, 39, 8, 170, 60, 247, 3, 1, 0, 150, 4, 1, 0, 0, 0, 0, 0, 220, 218, 1, 0, 0, 0, 1, 0, 34, 131, 1, 0, 0, 0, 0, 0, 0, 119, 11, 0, 0, 0, 4, 0, 0, 187, 9, 0, 184, 21, 0, 0, 90, 248, 1, 0, 0, 0, 1, 0, 250, 141, 1, 0, 85, 248, 1, 0, 0, 0, 1, 0, 186, 142, 1, 0, 45, 236, 1, 0, 38, 251, 254, 255, 173, 24, 0, 0, 97, 186, 255, 255, 107, 153, 1, 0, 52, 172, 255, 255, 97, 2, 0, 0, 205, 36, 255, 255, 210, 216, 1, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 145, 17, 1, 0, 146, 153, 9, 0, 146, 153, 9, 0, 146, 153, 9, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 146, 153, 9, 0, 146, 153, 9, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0,
1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 146, 153, 9, 0, 146, 153, 9, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 146, 153, 9, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 146, 153, 9, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 146, 153, 9, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 1
45, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 17, 34, 2, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 1, 34, 2, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 17, 34, 2, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1,
0, 0, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 16, 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 1, 34, 2, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 0, 17, 1, 0, 16, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 145, 17, 1, 0, 2, 136, 8, 0, 1, 34, 2, 0, 1, 34, 2, 0, 1, 34, 2, 0, 0, 17, 1, 0, 1, 34, 2, 0, 0, 17, 1, 0, 1, 34, 2, 0, 0, 17, 1, 0, 16, 17, 1, 0, 1, 34, 2, 0, 16, 17, 1, 0, 17, 34, 2, 0, 145, 17, 1, 0, 145,
17, 1, 0, 145, 17, 1, 0, 164, 252, 1, 0, 28, 0, 1, 0, 79, 142, 1, 0, 182, 243, 1, 0, 238, 255, 0, 0, 229, 151, 1, 0, 0, 0
exif:WhiteBalance: 0
exif:XResolution: 72/1
exif:YCbCrPositioning: 1
exif:YResolution: 72/1
Profile-exif: 17375 bytes


Reply to this email directly or view it on GitHub
#532 (comment)
.

@anaelChardan
Copy link

Yep on my Web page my Pictures appears with rotation of 90 so it's not good for the neck of my viewers ^^

@digitalkaoz
Copy link
Contributor

But what should we do? We only trust the exif data. If they arent correct
there is nothing we can do?! Maybe a separat Filter without auto_rotate?

anaelChardan [email protected] schrieb am Sa., 18. Apr. 2015 20:34:

Yep on my Web page my Pictures appears with rotation of 90 so it's not
good for the neck of my viewers ^^


Reply to this email directly or view it on GitHub
#532 (comment)
.

@anaelChardan
Copy link

I don't know, I will try with two separate filters. What is your ideas ? Else, I can add a field in my form to rotate or not the picture. I really don't know :)

@digitalkaoz
Copy link
Contributor

I have no idea. It depends ;)

anaelChardan [email protected] schrieb am Sa., 18. Apr. 2015 20:45:

I don't know, I will try with two separate filters. What is your ideas ?
Else, I can add a field in my form to rotate or not the picture. I really
don't know :)


Reply to this email directly or view it on GitHub
#532 (comment)
.

@bocharsky-bw
Copy link
Contributor

The problem is that auto_rotate filter should rotate only images, which load from mobile devices directly. If user load image from mobile to his laptop first, and then load this image from laptop to the website, this image already rotated by laptop browser and shouldn't rotate by website.

It's probably needs more tests. I tested this image (http://server.ndv.net.ua/IMG_0556.JPG) on iPhone and Ubuntu laptop. Photo was made by iPhone. When I load image directly from iPhone - auto_rotate filter work correctly. But when I drop this image to laptop and then from laptop load it to website, image was rotated incorrectly (The correct result was achieved when I turn of auto_rotate filter when load image from laptop).

I think we need to modified AutoRotateFilterLoader to rotate only images which loads dicrectly from mobile devices. Or we can create MobileAutoRotateFilterLoader which would do this things.

What are you think, guys?

@digitalkaoz
Copy link
Contributor

who should modify the exif data during download on your laptop? something in your workflow modifies the exif data...

@anaelChardan
Copy link

I agree with bocharsky, I think it's the source of the problem. I'll try to find a solution tonight.

@bocharsky-bw
Copy link
Contributor

@digitalkaoz The exif data not modify during I download image on my laptop. I think laptop browser resolve rotation based on exif data before upload it to website and website get already rotated image, nonetheless the source image on laptop stay not modified.

@Ananas85 Thanks! I will test it idea more thoroughly tomorrow too. And it will be great to test on Mac and Windows OS too.

@bocharsky-bw
Copy link
Contributor

I made an prototype that resolved this issue for me and create an PR #599.
I added new filter loader named mobile_auto_rotate . The config should be:

liip_imagine:
    filter_sets:
        my_thumb:
            filters:
                mobile_auto_rotate: ~

Could anybody test it in yours projects? It will be great if @Merk87 test it in his case too.

P.S. Do NOT forget to use my mobile_auto_rotate branch from PR to test it.
P.P.S. Do NOT use auto_rotate filter in tests when use mobile_auto_rotate. This filters will work incorrectly together at the same time.

@digitalkaoz
Copy link
Contributor

user agent spoofing cant be trusted, but if it works for you...

so desktop browser have support for auto_rotating images based on the exif data and mobile browser not? or vice versa?

@anaelChardan
Copy link

Hi, first, Thank you @bocharsky-bw , I think it will correct the problem, I just need you to test it into my project, can you help me please. :-)

@bocharsky-bw
Copy link
Contributor

@digitalkaoz Yes, you right. I think that desktop browser do the auto-rotating images based on the exif data before upload and mobile one do not.

@Ananas85 Hi! What help do you need? You can try to fetch the LiipImagineBundle from my fork to test it yourself with mobile_auto_rotate: ~ parameter as I described in my comment .

@lsmith77 lsmith77 added the State: Reviewing This item is being reviewed to determine if it should be accepted. label May 29, 2015
@dutchiexl
Copy link

Does this currently work in the master ?

@alexislefebvre
Copy link

alexislefebvre commented Dec 27, 2016

This filter work:

                rotate:
                    angle: 270

This one doesn't:

                auto_rotate: ~

It's like the filter is never called.

I use Imagine 0.5.

If I put throw new \Exception(print_r($data, true)); under this line and try to see the filtered image, I see the array but it contains no EXIF data.

Here is the full output:

 Array
(
[FileName] => Z
[FileDateTime] => 0
[FileSize] => 71484
[FileType] => 2
[MimeType] => image/jpeg
[SectionsFound] => COMMENT
[COMPUTED] => Array
(
[html] => width="640" height="480"
[Height] => 480
[Width] => 640
[IsColor] => 1
)

[COMMENT] => Array
(
[0] => CREATOR: gd-jpeg v1.0 (using IJG JPEG v80), default quality

)

)

Finally, I think that this is due to the fact that I use Imagine 0.5, but I can't change this since another Bundle require this old version.

@robfrawley
Copy link
Collaborator

robfrawley commented Dec 27, 2016

@alexislefebvre Imagine 0.5 is really old. I'd recommend updating at the nearest possible opportunity. Just an FYI.

@alexislefebvre
Copy link

alexislefebvre commented Dec 28, 2016

I removed the requirement on the 0.5 version and I was able to update to Imagine 0.6.3. Now the auto_rotate filter works.

Finally, it looks like auto_rotate only works with Imagine ~0.6. Can someone please confirm this? It could be explained in the documentation.

@alexislefebvre
Copy link

I was able to upgrade Imagine to the last version (0.6.3) and it works now, the auto_rotate is applied. Thanks @robfrawley.

@robfrawley
Copy link
Collaborator

@alexislefebvre I'll look into inserting a note in the documentation.

@deivid11
Copy link

auto_rotate wont work if exif PHP function is not enabled

@florianajir
Copy link

florianajir commented Apr 9, 2019

Still not working for me in v2.1.
original image is rotated via exif metadata but after the filter the image is back to initial wrong orientation..
With or without auto_rotate and strip options the result is the same (I tried all possible combinations..)

I installed imagick, exif, still not working.

The bundle shouldn't throw an exception if configuration is not working ?

@michellesanver
Copy link
Contributor

michellesanver commented Oct 4, 2019

Closing this issue because of #1230

More details: #1230 (comment)

If it's still an issue for you, please open a new issue, and thanks a lot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
State: Reviewing This item is being reviewed to determine if it should be accepted.
Projects
None yet