What would make the IMAGE_HEIGHT/WIDTH functions report incorrect size?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

What would make the IMAGE_HEIGHT/WIDTH functions report incorrect size?

Post by Jaymer »

Here is an image saved on my Mac:
Screen Shot 2021-04-20 at 11.46.48 AM.png
Screen Shot 2021-04-20 at 11.46.48 AM.png (202.04 KiB) Viewed 2400 times
The image (the inside of a moving truck) was taken in vertical/portrait mode. It would never have been taken sideways. You can see the shadow of the person.
Its taller than it is wide.
960 wide
1280 tall

YET AWARE SWAPS THE DIMENSIONS. WHY?

I upload that into Aware, and here is the Production Log where a RULE is executing thats on the picture BO:
Screen Shot 2021-04-20 at 11.41.20 AM.png
Screen Shot 2021-04-20 at 11.41.20 AM.png (38.63 KiB) Viewed 2400 times
This causes the image to print in a report SIDEWAYS. Very frustrating to the end user.
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
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: What would make the IMAGE_HEIGHT/WIDTH functions report incorrect size?

Post by Jaymer »

This does not always happen.
Other images, same orientation, same camera but taken different days, load fine. I can check the db and see the height/width is correct.
Those images print fine on the report.
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
joben
Posts: 221
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: What would make the IMAGE_HEIGHT/WIDTH functions report incorrect size?

Post by joben »

Don't know how AwareIM handles images, but I would definitely compare the metadata of two images that are taken, as you say, with the same orientation and same camera, but yet yield different rotation results in AwareIM.

The metadata can be viewed with an online tool like this:
http://exif.regex.info/exif.cgi
or
https://www.exifdata.com/exif.php

See if the images differ somehow when it comes to things like rotation, resolution, width, height. I think it can be expressed in different ways.
AwareIM might care about this type of metadata.
Regards, Joakim

Image
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: What would make the IMAGE_HEIGHT/WIDTH functions report incorrect size?

Post by Jaymer »

test_pic.jpeg
test_pic.jpeg (100.47 KiB) Viewed 2069 times
joben
i think i've found something interesting.
run this image thru this: http://exif.regex.info/exif.cgi

what I see when viewed on the website is that the THUMBNAIL has been rotated.
When I look at this in my aware app, the image appears fine on several screens (in a grid, on a form, in the gallery), but when printed, this one is rotated.
Remember that printing is from Jasper - so its possible its [possibly incorrectly] seeing some EXIF info that says its rotated and applying some transformation to it.
Clearly, the EXIF info has a thumbnail thats diff. than the main image.

How can I get these in sync?
This is taken on an Android phone, with a camera app that resamples the image to make it smaller and easier to upload. But out of a batch of images, all taken the same orientation, some will have the rotated thumbnail and print sideways.
Attachments
Screen Shot 2021-05-21 at 1.42.51 PM.png
Screen Shot 2021-05-21 at 1.42.51 PM.png (174.03 KiB) Viewed 2069 times
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
joben
Posts: 221
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: What would make the IMAGE_HEIGHT/WIDTH functions report incorrect size?

Post by joben »

Yep, this could be a lead.

The first thing that comes to mind is running some sort of EXIF stripper script on the images and see if it changes for the better.

I have used this software for stripping metadata long time ago:
http://www.steelbytes.com/?mid=30 (Windows only)

There are probably tons of other ways to do it.
Regards, Joakim

Image
Post Reply