I originally posted this issue in the gallery2 forums:
http://gallery.menalto.com/node/79725
This bug is confirmed on Gallery 2.2.4.
Steps to reproduce:
0. Install Gallery, log in as site admin, add Replica module and at least
one toolkit.
1. Add a photo.
2. Click on the photo, "Edit Photo", "Modify Photo", and finally "C 90°".
3. Observe that the photo was rotated clockwise 90 degrees.
4. Click "Create Replica" and stick the replica somewhere.
5. Find the replica, click on it
6. Observe that the replica was also rotated clockwise 90 degrees as
compared to the originally uploaded image.
7. While viewing the replica, click "Edit Photo", "Modify Photo", and
finally "180°".
8. Observe the thumbnail, then go "Back to Photo" and click on the
full-size image link.
Actual behavior:
Gallery says "Image Rotated Successfully"; the full-size image is rotated
180 degrees from the originally uploaded image, but thumbnails and resized
versions are rotated only 90 degrees from the originally uploaded image.
Expected behavior:
Thumbnail, resized, and full-size versions of the replica would be rotated
180 degrees from the rotated image (that is, 270 degrees clockwise or 90
degrees counterclockwise from the originally uploaded image).
Diagnosis:
When the replica module creates a replica, it adds derivatives that point
to the original, replicated item. For example, if the original item has ID
21 with preferred derivative ID 22 (source ID 21) and thumbnail derivative
23 (source ID 22), then a replicated item with ID 24 will still carry a
thumbnail derivative pointing to ID 22.
The solution to this problem is probably to have the replica module copy
all derivatives from the original item, including the preferred derivative,
and then do the equivalent of
GalleryCoreApi::remapSourceIds($original->getID(), $preferred->getID()),
except only on the new derivatives.
Alternatively, one could argue that replicas should not have independent
derivatives, in which case ItemEditRotateAndScale should be disabled for
replicas. I'm not going to take a position on this issue, but if there is
consensus on the right approach then I'm happy to write up a patch.
Nobody/Anonymous
None
Gallery 2
Public
|
Date: 2008-07-16 21:12
|
|
Date: 2008-07-16 21:07
|
| Field | Old Value | Date | By |
|---|---|---|---|
| category_id | deleted | 2008-10-24 20:15 | ckdake |
| summary | [G2] Replicas and Derivatives do not interact well | 2008-10-24 20:15 | ckdake |
| category_id | deleted | 2008-10-24 19:37 | ckdake |
| summary | Replicas and Derivatives do not interact well | 2008-07-16 21:07 | vectro |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use