distorted medium photos #452

Open
opened 2026-10-04 23:59:25 +02:00 by adam · 0 comments
Owner

I'm using piwigo 2.8.0 with a photo directory containing 10000+ photos.
To generate the thumbnails directory I'm using a (self written) bash script which use convert from imagemagick.
For example to create medium images :

convert -quality 90 -auto-orient -thumbnail "792x594" DSCF2478.JPG DSCF2478-me.JPG

The size of the generated image is :

$ exiftool DSCF2478-me.JPG | grep 'Image Size'
Image Size : 445x594

The image size is correct, since the orientation of the original photo is :

exiftool DSCF2478.JPG | grep Orientation
Orientation : Rotate 90 CW

However, when using piwigo and browsing to this photo, it is distorted (except if I view the original photo).
When looking at the page source code, I'm seeing this :

<img src="_data/i/galleries/path/to/DSCF2478-me.JPG" width="792" height="594" alt="DSCF2478.JPG"

I don't know from where the width="792" comes from (maybe the database ?), but if I re-synchonize
the files metadata from the admin pages, the result is always the same.

Obviously this does not happen with only one photo, but with many (but not all) «rotated» photos.

Any help ? Thanks.

I'm using piwigo 2.8.0 with a photo directory containing 10000+ photos. To generate the thumbnails directory I'm using a (self written) bash script which use convert from imagemagick. For example to create medium images : > convert -quality 90 -auto-orient -thumbnail "792x594" DSCF2478.JPG DSCF2478-me.JPG The size of the generated image is : > $ exiftool DSCF2478-me.JPG | grep 'Image Size' > Image Size : 445x594 The image size is correct, since the orientation of the original photo is : > exiftool DSCF2478.JPG | grep Orientation > Orientation : Rotate 90 CW However, when using piwigo and browsing to this photo, it is distorted (except if I view the original photo). When looking at the page source code, I'm seeing this : > <img src="_data/i/galleries/path/to/DSCF2478-me.JPG" width="792" height="594" alt="DSCF2478.JPG" I don't know from where the width="792" comes from (maybe the database ?), but if I re-synchonize the files metadata from the admin pages, the result is always the same. Obviously this does not happen with only one photo, but with many (but not all) «rotated» photos. Any help ? Thanks. <!-- github-sync-id:152988559 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#452