Image processor rotating images and leaving black bars
Honestly, I'm unsure where to start explaining this one but here goes.
I built a Umbraco project using 7.7.2 for a friend but it never went live. It sat dormant for about 2 years until he recently decided he wanted to put some effort into it and get it live. I sent it over for him to populate and I'm experiencing a very weird issue with Image Processor where after calling GetCropUrl("alias", "cropAlias") it is rotating and sometimes leaving black bars .
He uploaded a tonne of images into the media section and also via the various croppers available on the different document types and although they display correctly (correct orientation) in the CMS. On the front end they are wrong.
Example in the CMS (for image cropper)
Example on the front end (for image cropper)
Example in the CMS (for media image)
Example on the front end
The code (wasnt using model builder at the time of the build) is as follows:
Cropper image code (service is IPublishedContent via a foreach)
Perhaps its something to do with the image itself which were all from iPhone. If I create an image canvas in photoshop i.e. 768x768 place the image o, save for web, and upload to Umbraco via media or crop... it displays as expected in the CMS and front end. The problem is there are hundreds of images and I wanted to avoid going through them all and editing. Also, it gives me no confidence in future uploads.
Ive built many small Umbraco sites using v8 and v7 and ive not come across this. If anyone can help me I would be really grateful.
No is an honest answer, so frustrating! I've used Umbraco for many years and not experienced anything like it.
I established that it was something related to the image that was uploaded, what I don't really know! I read posts about iPhone images containing EXIF metadata that may cause the issue but unsure in my case. To resolve i did two things
Downloaded all the affected images (a lot) and uploaded them to photoshop and re-edited\saved them. After re-uploading them the displayed as expected
For images in the media, i installed https://our.umbraco.com/packages/backoffice-extensions/tooorangeyuspinmerightround/. Even the images in the media section were displaying the correct orientation they were in the wrong orientation on the front end. Running it through uspinmerightround didnt actually alter the orientation in the back office but it fixed it on the front end. How im not sure!
It was a frustrating issue that i 'worked around' but im not filled with any confidence that the next image to be uploaded will be incorrect.
Hope this helps and good luck. Let me know if you solve it.
Image processor rotating images and leaving black bars
Honestly, I'm unsure where to start explaining this one but here goes.
I built a Umbraco project using 7.7.2 for a friend but it never went live. It sat dormant for about 2 years until he recently decided he wanted to put some effort into it and get it live. I sent it over for him to populate and I'm experiencing a very weird issue with Image Processor where after calling GetCropUrl("alias", "cropAlias") it is rotating and sometimes leaving black bars .
He uploaded a tonne of images into the media section and also via the various croppers available on the different document types and although they display correctly (correct orientation) in the CMS. On the front end they are wrong.
Example in the CMS (for image cropper)
Example on the front end (for image cropper)
Example in the CMS (for media image)
Example on the front end
The code (wasnt using model builder at the time of the build) is as follows:
Cropper image code (service is IPublishedContent via a foreach)
Media Image code (pulled from an album in the media section)
I have looked at the following things with no luck
It seems that it uses a crop mode of percentage instead of crop!
I have read some posts on 'our' mentioning EXIF data but after removing the photo info it doesn't make a difference.
Some of the posts on Our
Perhaps its something to do with the image itself which were all from iPhone. If I create an image canvas in photoshop i.e. 768x768 place the image o, save for web, and upload to Umbraco via media or crop... it displays as expected in the CMS and front end. The problem is there are hundreds of images and I wanted to avoid going through them all and editing. Also, it gives me no confidence in future uploads.
Ive built many small Umbraco sites using v8 and v7 and ive not come across this. If anyone can help me I would be really grateful.
Did you found a fix ?
Hey Thomas,
No is an honest answer, so frustrating! I've used Umbraco for many years and not experienced anything like it.
I established that it was something related to the image that was uploaded, what I don't really know! I read posts about iPhone images containing EXIF metadata that may cause the issue but unsure in my case. To resolve i did two things
It was a frustrating issue that i 'worked around' but im not filled with any confidence that the next image to be uploaded will be incorrect.
Hope this helps and good luck. Let me know if you solve it.
Paul
is working on a reply...