Thinking about this some more we could do the following:
1) Alter the artefact_file_image table and add a column 'orientation' where we record one of the 4 possible values, 0 (the default), 90, 180, 270
2) On saving/choosing image rotation state, eg 90 deg clockwise we could record in the artefact_file_image table 'orientation' column as the preferred orientation of the image
So next time the image is rendered on a page (or wherever) it is shown in that rotation from original either by:
3a) applying the rotation via css or
3b) running image through a php function to generate a new resized image with that orientation before displaying it.
The advantage of this are:
- Will only deal with images in relating to rotation
- Never touch the original so easier to change orientation choice multiple times
- No need to have 'cancelling' as it will be easy to choose any of the 4 possible rotation choices
Thinking about this some more we could do the following:
1) Alter the artefact_file_image table and add a column 'orientation' where we record one of the 4 possible values, 0 (the default), 90, 180, 270
2) On saving/choosing image rotation state, eg 90 deg clockwise we could record in the artefact_file_image table 'orientation' column as the preferred orientation of the image
So next time the image is rendered on a page (or wherever) it is shown in that rotation from original either by:
3a) applying the rotation via css or
3b) running image through a php function to generate a new resized image with that orientation before displaying it.
The advantage of this are:
- Will only deal with images in relating to rotation
- Never touch the original so easier to change orientation choice multiple times
- No need to have 'cancelling' as it will be easy to choose any of the 4 possible rotation choices