Eero af Heurlin schrieb:
> Andreas Flack wrote:
>> Hi!
>>
>> I'm playing with my new cellphone right now and am trying to upload some 
>> of it's pictures into a o.r.photostream topic. It all works relatively 
>> well, except for one problem: Pictures in landscape orientation work 
>> fine, but for pictures in portrait orientation, all derived images have 
>> the wrong orientation, i.e. the archival image is correctly displayed in 
>> portrait mode, but all derived images are displayed in landscape mode.
>  >
> 
> The EXIF data in the picture is wrong (blame cellphone). Take exifrotate 
> out of the filter chains and always rotate manually as needed.
> 
> Funny hat the *archival* image gets rotated, it AFAIRecall should not be 
> touched after upload.

Sorry, I was a bit confused there. I said archival image because I meant 
the image that is shown when you click the "archival" link on the view 
page. But the image shown when you click on the link is not the archival 
image, but the "main" one:

     * archival_img_0012.JPG: 1600x1200, 431.558 Byte
     * img_0012.JPG: 1200x1600, 429.955 Byte
     * thumbnail_img_0012.JPG: 113x150, 13.902 Byte
     * view_img_0012.JPG: 450x600, 72.713 Byte

The archival_img_0012.JPG file really doesn't change at all, it's the 
one called img_0012.JPG. So when I upload photos with exifrotate 
enabled, archival_img, thumbnail_img and view_img are in landscape mode, 
while img is in portrait mode.

This is the schema I use:

         'photo' => Array
         (
             'title' => 'photo',
             'type' => 'photo',
             'type_config' => Array
             (
                 'filter_chain' => "exifrotate()"
                 'auto_thumbnail' => Array(150,150),
                 'derived_images' => array
                 (
                     // Intentionally this way, so that portraits can be 
taller
                     'view' => 'resize(600,700)',
                 ),
             ),
             'widget' => 'photo',
         ),

I tried removing exifrotate from the filter_chain. When I recreate all 
derived images afterwards, everything (except archival_img) is in 
landscape mode, so rotating now works.

I researched a bit and found out that according to API doc, filter_chain 
is supposed to work only on the main image, so the behavior I'm seeing 
would be explainable. In fact, when I change my schema to this:

         'photo' => Array
         (
             'title' => 'photo',
             'type' => 'photo',
             'type_config' => Array
             (
                 'filter_chain' => 'exifrotate()',
                 'auto_thumbnail' => Array(150,150),
                 'derived_images' => array
                 (
                     // Intentionally this way, so that portraits can be 
taller
                     'view' => 'exifrotate();resize(600,700)',
                 ),
             ),
             'widget' => 'photo',
         ),

i.e. if I explicitly call exifrotate for the 'view' image, it gets 
rotated as well. But the auto_thumbnail still is in landscape mode and I 
don't know how to add a filter there. But wouldn't it make sense for the 
auto_thumbnail to inherit the filter_chain from the main image?



Bye,

Andreas



> 
> /Rambo
> _______________________________________________
> user mailing list
> [email protected]
> http://lists.midgard-project.org/mailman/listinfo/user


_______________________________________________
user mailing list
[email protected]
http://lists.midgard-project.org/mailman/listinfo/user

Reply via email to