-
Notifications
You must be signed in to change notification settings - Fork 335
[gallery thumbnails] orientation doesn't work #1568
Comments
Well, I have also managed to make a workaround for publicly shared images not rotating properly, I'll add a full diff against OC 6.0.0a for both issues here:
|
@georgehrke Can you have a look? |
Sure, I should find some time later today |
The proposed changes here to 'apps/gallery/lib/thumbnail.php' would probably also fix the thumbnail rotation in the below issue. This change would also be needed to fix rotation with php5.5. |
@gothfox Do you agree to release your code changes under the terms of the MIT License? |
@georgehrke Can you make sure to include the below change which fixes the php5.5 rotation problem? This is a different issue then the issue mentioned in this thread. Thanks |
Could it be because the thumbnails are converted to PNG? That would probably destroy the rotation hints. see #1590 |
Due to bug #1590 the thumbnails are converted to PNG and thus does not contain EXIF information[1] about any rotation. [1] http://stackoverflow.com/questions/9542359/does-png-contain-exif-data-like-jpg |
Hello, I'm also experiencing rotated thumbnails in the picture gallery. The mouse-over slide-show shows the pics in the correct orientation and if you view the files individually they're also correct. Only the thumbnails of the pictures themselves are rotated. Before I upgraded to OC6 the thumbnail orientation was correct. My setup: Does anyone have any idea what can be done about this. My php and ajax skillz aren't... just aren't. But I can apply a patch :P. |
@pornstarsui |
Thanks Pascal... I didn't know the thumbnails were png files. |
@pornstarsui No wonder. The thumbnails keep the .jpg extension in the filename. It seems to be an error - it doesn't make sense to convert JPEGs to PNG. They are two very different file formats. JPEG are great for Photos - PNG are great for graphics with large blocks of exactly the same color. |
@gothfox can you please make a PR with your changes ? |
I believe this issue has been solved in master for owncloud/gallery apps thumbnails. Picture extension, type, and orientation are all preserved for the gallery app's thumbnails.
|
It seems that for Gallery thumbnails OC_Image is being created from filehandle so exif_read_data in getOrientation() fails because it doesn't know file full path, which is why gallery shows thumbnails with incorrect orientation.
I'm running OC 6.0.
I managed to add a quick hack which seemingly fixes it, but I'm not sure if there are possible side effects:
In apps/gallery/lib/thumbnail.php, lines 68-70:
(original code is commented out)
Sorry for the lack of proper diff.
The text was updated successfully, but these errors were encountered: