Image Upload in Portrait

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
bondicoffee
Posts: 130
Joined: Tue Dec 03, 2013 10:19 pm

Image Upload in Portrait

Post by bondicoffee »

I need to upload the picture as portrait.
In Picture Type attribute, When I uploading portrait image, the image gets rotated and saved as landscape.
Does any one have solution to this issue?
Thanks
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Image Upload in Portrait

Post by aware_support »

This is a browser issue for some types of images (jpeg, I think). Please Google for a solution - it's not an Aware IM problem.
Aware IM Support Team
bondicoffee
Posts: 130
Joined: Tue Dec 03, 2013 10:19 pm

Re: Image Upload in Portrait

Post by bondicoffee »

When a portrait photo is taken using a mobile device, the EXIF data of the image shows orientation:90 whereas for a landscape photo the orientation is 0 , which means a portrait photo is landscape with 90 degree rotation information embedded in it.


As a result, while uploading image in awareim, I believe aware js/kendo js doesn’t interpret this EXIF data of image.

Is there any way or a command in script that can read the EXIF data of image so that we can disable/remove orientation of portrait image ?
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Image Upload in Portrait

Post by aware_support »

No, this is not a Kendo UI issue - it has nothing to do with Kendo UI. Images are shown as HTML by the browser. You can see that in the browser HTML/CSS inspector, which will show how the BROWSER interprets the original image - it interprets it wrong.
Aware IM Support Team
RLJB
Posts: 914
Joined: Tue Jan 05, 2010 10:16 am
Location: Sydney, Australia

Re: Image Upload in Portrait

Post by RLJB »

Hey Bondicoffee - did you find a solution for this? we're getting a bunch of tickets for the same issue, thanks.
Rod. Aware 8.6 (latest build), Developer Edition, on OS Linux (Ubuntu) using GUI hosted on AWS EC2, MYSQL on AWS RDS
mrbdrm
Posts: 349
Joined: Tue Oct 16, 2012 11:44 am

Re: Image Upload in Portrait

Post by mrbdrm »

support is correct its not Aware issue or kendo.

its a browser issue and i think on IOS only
RLJB
Posts: 914
Joined: Tue Jan 05, 2010 10:16 am
Location: Sydney, Australia

Re: Image Upload in Portrait

Post by RLJB »

We have user tickets, with screen shots of an Image sitting in Windows Explorer with correct orientation, then they upload to Aware system and it is sideways. Does anyone know of a solution/workaround?
Rod. Aware 8.6 (latest build), Developer Edition, on OS Linux (Ubuntu) using GUI hosted on AWS EC2, MYSQL on AWS RDS
Jaymer
Posts: 2451
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Image Upload in Portrait

Post by Jaymer »

BUMP

now an issue for me too

Pics this morning were taken Portait on a cell phone.
Uploaded using Multi Upload and stored in database table Photos.
A function was calculating and storing Height & Width in the Photos table.
Data shows 4000 WIDE, and 3000 high ---- which means its been rotated, because Portrait should be 4000 HIGH, not wide.

I took a pic on iPad, uploaded it, I can see IN THE LOG the Height/Width get calculated and the image is already rotated.
It gets stored in BOTH the database AND the filesystem "incorrectly".
Last edited by Jaymer on Tue Sep 24, 2019 12:14 am, edited 1 time in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
karelh
Posts: 86
Joined: Wed Oct 26, 2016 10:20 pm

Re: Image Upload in Portrait

Post by karelh »

Hey

Not sure if this will help but it depends on the orientation of the phone. I struggled with this as well so I did the following.

You can use a tool called ImageMagick to rotate the image any way you want. I just added a button for the user that says "Rotate" and they can hit the button until they are satisfied. (turns it 90' right every time) . This is not an AwareIM problem but at least this solved my issue. You can probably run a check to calculate the WxH and then automatically rotate it....

See my process code below for reference. Hope it helps

EXPORT DOCUMENT BO.Photo TO FILE 'c:\Conversions\photo.jpg'
EXECUTE PROGRAM 'c:\Conversions\IM\magick.exe c:\Conversions\photo.jpg -rotate 90 c:\Conversions\photo1.jpg'
IMPORT DOCUMENT BO.Photo FROM 'c:\Conversions\photo1.jpg'
DELETE FILE 'c:\Conversions\photo1.jpg'
DELETE FILE 'c:\Conversions\photo.jpg'
Jaymer
Posts: 2451
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Rotated using ImageMagick

Post by Jaymer »

Was able to rotate it "in place" with no issue.
And because I'm storing in the file system, I don't need to re-IMPORT.
Only issue is that the Browser has cached the un-rotated image, and because the filename hasn't changed, it doesn't show the updated image.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply