Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIWImage and EXIF tag
#1
I am using Intraweb 14.2.7 with C++ Builder Rad Studio 10.2.3
I have noticed a problem with the display of pictures in TIWImage specially with mobile devices.
When I upload a picture into TIWImage, it seems vertical as expected. But when I try to rotate it, it appears that in fact it was rotated -90 degrees.
It seems that the problem is related to pictures EXIF tag.
So, is there a parameter to setup with TIWImage so that it will upload all pictures vertically despite the EXIF tag ?
Reply
#2
IW doesnt "upload vertically". Images are sent unchanged. The EXIF tag however can be used by some clients to determine how it is displayed. If this is the case, your EXIF tag data is wrong and you need to remove or correct it.
Reply
#3
I got that.
So, the question is how can I detect the EXIF tag and the position of an image uploaded in TIWImage ?
Reply
#4
Some browsers will ignore EXIF tag in images and they won't rotate it regardless of what is in there. Seems that Chrome 81+ will respect that but I haven't tested this.

I suggest you rotate the images before uploading them to the server.

https://stackoverflow.com/questions/1202...rientation

Or you can use external CSS to do the same, but if you have several images this can be hard to get correctly

https://stackoverflow.com/questions/1183...3#11832483
Reply
#5
I already wrote routines to rotate images in different directions -90 and 90 degrees.
In fact the user upload the picture from his mobile device.
My main problem is to determine in TIWImage what is the real position of the picture: 0, -90 or 90 degrees when it is uploaded by the user ?
This will help to determine if the uploaded picture needs to be rotated.
Because it will be resource consumption to rotate all pictures uploaded by users. And plus have them not vertical.
Reply
#6
EXIF processing is outside the scope of IntraWeb. Im sure there are libraries in Delphi for managing them. IntraWeb does not process image files, it simply slings them to the browser as data.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)