Hello, khoomy!
Please look to the attached patch for 7.x-1.x-dev which is a new version of the module. Here are the major changes:
- Added "rotate images" permission to limit access to the feature.
- Added possibility to rotate images in user profiles including Profile2 module image fields.
- Added support to any field names not only 'field_image'
- Rotated images are renamed by adding _r[number] suffix and therefore no need to flush image cache and clear caches.
- hook_entity_update and hook_entity_insert are replaced with hook_entity_presave.

Hope the patch is good enough to include in the module.

CommentFileSizeAuthor
#6 new-features.patch14.72 KBkhoomy
#5 update-1-2.patch31.96 KBmartynov
update-1-1.patch28.98 KBmartynov

Comments

martynov created an issue. See original summary.

martynov’s picture

Issue summary: View changes
martynov’s picture

Issue summary: View changes
khoomy’s picture

Hi martynov

Thanks for your contribution with some extra features. I tried to patch but found some issues as:

While creating new node and before saving if we upload image and rotate it always rotates 180 degree but this can be fixed if use existing condition in javascript file as

if (rotate >= 270) {
                    rotate = 0;
                } else {
                    rotate = rotate + 90;
                }

But when we save node then it does not update image with proper rotated value.

If we rotate image in existing node then it works fine but still need existing condition as mentioned above.

Please look your code again and provide proper patch with above fix, I will apply path in new version and will definitely give you credits in commit :)

Good work

Khoomy

martynov’s picture

StatusFileSize
new31.96 KB

Hello, Khoomy!
I corrected the mentioned issue and added the README.txt file in the new patch. Please take a look.

khoomy’s picture

StatusFileSize
new14.72 KB

Hi martynov

We have only one issue left that while creating node, if upload image and rotate image to 90 degree then after save image was actually rotated to 180 degree instead of 90

Thanks
Khoomy

martynov’s picture

This is probably a browser cache issue. I cannot reproduce it. In my local environment the module rotates images on new nodes correctly. Please, check the javascript aggregation and caching settings, refresh your browser with F5 and repeat the whole operation.

martynov’s picture

Hi Khoomy!
Did you see my previous post? I am looking forward for your reply.

  • khoomy committed ec175e4 on 7.x-1.x
    Issue #2864982 by khoomy,martynov: Added support to any field names not...
khoomy’s picture

Hi martynov

New release 7.x-2.0 has been committed and live now

https://www.drupal.org/project/simple_image_rotate

Your work much appreciated :)

Thanks
Khoomy

  • khoomy committed ec175e4 on 7.x-2.x
    Issue #2864982 by khoomy,martynov: Added support to any field names not...
martynov’s picture

Thanks for reply and new release!

khoomy’s picture

Version: 7.x-1.x-dev » 7.x-2.0
Assigned: martynov » Unassigned
Status: Active » Closed (works as designed)