MyBB Community Forums

Full Version: Image Auto-Resizer 1.1.0
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
Hi TWDesigns,

Thanks for your positive feedback.

Re your problem, my suspicion is that the rotated images have EXIF data indicating that they should be rotated, per this StackExchange question: PHP read_exif_data and Adjust Orientation.

Taking inspiration from this answer in that question, I've implemented rotation based on EXIF data prior to resizing. Hopefully this is functioning properly and solves your problem. I've tested that the new code doesn't break ordinary functionality, but have no rotated images on which to test this myself. Thus, I solicit your assistance in testing the solution.

I've attached the test version of the plugin (1.0.3-prerelease) to this message. Please let me know whether or not it works for you.
your great!!
(2021-10-26, 11:02 AM)theionix Wrote: [ -> ]your great!!

I hope you're saying that because you tested the new version and it worked for you!
(2021-10-26, 03:02 AM)Laird Wrote: [ -> ]Hi TWDesigns,

Thanks for your positive feedback.

Re your problem, my suspicion is that the rotated images have EXIF data indicating that they should be rotated, per this StackExchange question: PHP read_exif_data and Adjust Orientation.

Taking inspiration from this answer in that question, I've implemented rotation based on EXIF data prior to resizing. Hopefully this is functioning properly and solves your problem. I've tested that the new code doesn't break ordinary functionality, but have no rotated images on which to test this myself. Thus, I solicit your assistance in testing the solution.

I've attached the test version of the plugin (1.0.3-prerelease) to this message. Please let me know whether or not it works for you.

Good job buddy!
(2021-10-26, 03:02 AM)Laird Wrote: [ -> ]Hi TWDesigns,

Thanks for your positive feedback.

Re your problem, my suspicion is that the rotated images have EXIF data indicating that they should be rotated, per this StackExchange question: PHP read_exif_data and Adjust Orientation.

Taking inspiration from this answer in that question, I've implemented rotation based on EXIF data prior to resizing. Hopefully this is functioning properly and solves your problem. I've tested that the new code doesn't break ordinary functionality, but have no rotated images on which to test this myself. Thus, I solicit your assistance in testing the solution.

I've attached the test version of the plugin (1.0.3-prerelease) to this message. Please let me know whether or not it works for you.

For what ever reason, after I updated the plugin by disabling, uploading files, then reactivating, it fails to attach images. Also If I hit preview I get a white screen. No errors even though I have Warnings and Errors enabled.

PHP Version 7.3.15 and MyBB Version 1.8.28

*update: also disabled the other 2 plugins I had with same results while testing 1.0.3-prerelease
(2021-10-26, 11:25 PM)TWDesigns Wrote: [ -> ]For what ever reason, after I updated the plugin by disabling, uploading files, then reactivating, it fails to attach images. Also If I hit preview I get a white screen. No errors even though I have Warnings and Errors enabled.

PHP Version 7.3.15 and MyBB Version 1.8.28

*update: also disabled the other 2 plugins I had with same results while testing 1.0.3-prerelease

Hmm. I've slightly improved the plugin's error-handling in the new function. Please see whether the attached version works for you. No need to deactivate-reactivate - just copy the files.
(2021-10-27, 02:41 AM)Laird Wrote: [ -> ]
(2021-10-26, 11:25 PM)TWDesigns Wrote: [ -> ]For what ever reason, after I updated the plugin by disabling, uploading files, then reactivating, it fails to attach images. Also If I hit preview I get a white screen. No errors even though I have Warnings and Errors enabled.

PHP Version 7.3.15 and MyBB Version 1.8.28

*update: also disabled the other 2 plugins I had with same results while testing 1.0.3-prerelease

Hmm. I've slightly improved the plugin's error-handling in the new function. Please see whether the attached version works for you. No need to deactivate-reactivate - just copy the files.

Same issue, so I enabled logging and grabbed what's happening. Hope this helps.

[27-Oct-2021 02:46:35 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function exif_read_data() in /inc/plugins/auto_resizer.php:230
Stack trace:
#0 /inc/plugins/auto_resizer.php(253): autorsz_fix_image_orientation('./uploads/20211...')
#1 /inc/plugins/auto_resizer.php(208): autorsz_resize_file('202110/post_1_1...')
#2 /inc/class_plugins.php(142): autorsz_hookin__upload_attachment_thumb_start(Array)
#3 /inc/functions_upload.php(623): pluginSystem->run_hooks(Array, Array)
#4 /inc/functions_upload.php(817): upload_attachment(Array, false)
#5 /newthread.php(175): add_attachments(0, Array, 'posthash='31a0f...', 'newthread')
#6 {main}
  thrown in /inc/plugins/auto_resizer.php on line 230
It does help. The problem is that your PHP installation doesn't have the exif module enabled.

I'll add some checking code so that this doesn't result in an error, but rotation correction won't work unless/until you enable that module.
(2021-10-27, 03:47 AM)Laird Wrote: [ -> ]It does help. The problem is that your PHP installation doesn't have the exif module enabled.

I'll add some checking code so that this doesn't result in an error, but rotation correction won't work unless/until you enable that module.

Thank you for the information! I will get to work on my issues. Again thank you for an awesome plugin!
(2021-10-27, 03:47 AM)Laird Wrote: [ -> ]It does help. The problem is that your PHP installation doesn't have the exif module enabled.

I'll add some checking code so that this doesn't result in an error, but rotation correction won't work unless/until you enable that module.

It appears that my Hosting doesn't have this enabled. Working to get that done and will retest. Ty
Pages: 1 2 3 4 5 6 7