[Gambas-user] Is exif Orientation obtainable without any exif libs/commands?

Rolf-Werner Eilert rwe-sse at osnanet.de
Mon Dec 5 17:13:56 CET 2022

Am 05.12.22 um 17:06 schrieb Bruce Steers:
> So i've found exiftool is a tool to easily retrieve Orientation flag 
> from an image but it's not on all systems, not by default at least.
> Was wondering if anyone has a method to retrieve exif flags from an 
> image or the Orientation one at least?
> I found rotating and saving an image back to file removed it's 
> Orientation flag so that's cool.
> But I also found that to save a similar size file back i needed an 
> instruction like...
> hPicture.Save(sPath, 92)
> I had to play with the quality value and found 92 about the right value 
> for a similar size file.
> Wondered if there was a better way to save the image back with identical 
> file size (i assume a rotated image to be the same mass/size)
> Ultimately I'm looking to spin my images round to be correct way up with 
> zero quality change.
> The only piece of the puzzle gambas seems to lack is detecting the exif 
> Orientation flag.
> Something in my mind suspects gambas Read could possibly be able to get 
> the data from the files?
> Respects
> BruceS
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----

Without looking in detail, but it should be in different positions 
depending on the file format. So for instance you would have to know 
where and how it is saved in a jpg file, open the file in binary mode, 
and jump to the information. The same with other file formats.

Or did I get you wrong?


More information about the User mailing list