ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Accessing the EXIF ISO Speed
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

bmesser

United Kingdom
234 Posts

Posted - Dec 29 2013 :  09:49:53  Show Profile  Reply
Hi

Is there any way that I can access the ISO speed of an image?

I've looked at the demo and that doesn't do it. The help file mentions this code example:

// Read the ISO value for a Canon camera photo
case ImageEnView1.IO.Params.EXIF_MakerNote.GetIntegerIndexed(1, 16) of
15: ShowMessage('Auto');
16: ShowMessage ('50');
17: ShowMessage ('100');
18: ShowMessage ('200');
19: ShowMessage ('400');
end;

This works and returns 'Auto' in the images that I have tested but if you right click on the file properties Windows says its ISO-100, which is also what Picasa say's it is. If they can access the true value why can't I do it in ImageEN?

I just would have thought that the three basic values that EXIF data should record are aperture, shutter speed and ISO speed.

Bruce.

PS I do use Canon DSLR cameras.

w2m

USA
1990 Posts

Posted - Dec 29 2013 :  10:27:23  Show Profile  Reply
There is a demo app in my EBook that shows ISO values. The demo is called iexEXIFRoutines TListView Demo:
// EXIF_ISOSpeedRatings
// CCD sensitivity equivalent to Ag-Hr film speedrate.
_EXIF_ISOSpeedRatings:
  if (EXIF_ISOSpeedRatings[0] <> 0) and (EXIF_ISOSpeedRatings[0] <> -1) then
  result := inttostr(EXIF_ISOSpeedRatings[0]);

TIOParamsVals.EXIF_ISOSpeedRatings

Declaration
property EXIF_ISOSpeedRatings[index: Integer]: Integer;

Description
CCD sensitivity equivalent to Ag-Hr film speedrate. index is in the range 0 to 1.
"0" for all values means "unspecified".

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

bmesser

United Kingdom
234 Posts

Posted - Dec 29 2013 :  11:18:01  Show Profile  Reply
Bill

Thanks for the tip, but I have just checked out an EXIF library (https://code.google.com/p/ccr-exif/) which is really quite simple to use and gives me the ISO speed without any problem.

It also gives me the aperture and F Number (which I always thought were the same thing) just as easily!

ImageEN doesn't really help with the F number e.g. it gives me the aperture 4.375 (in the example that I'm using at the moment) but not with the corresponding F number of f/4.5, which this library does (there's an interesting email about this conversion http://stackoverflow.com/questions/1996833/calculating-exif-exposure-time-as-a-fraction-delphi).


I don't want to add more complexity to my app by having to add this library and would really like to rely fully on the EXIF functionality built into ImageEN and hence the question.

Bruce.
Go to Top of Page

Uwe

284 Posts

Posted - Dec 29 2013 :  11:38:52  Show Profile  Reply
quote:
ImageEN doesn't really help with the F number


The unit for F-stop is APEX.

Quote from help file:

"To convert this value to ordinary F-number (F-stop), calculate this value's power of root 2 (=1.4142). For example, if the ApertureValue is '5', F-number is 1.41425 = F5.6."


So...

FloatToStr(Round(Power(1.4142, EXIF_ApertureValue)));


Read the manual. It's all in there.

Uwe




Go to Top of Page

w2m

USA
1990 Posts

Posted - Dec 29 2013 :  11:49:47  Show Profile  Reply
ImageEn provides ISOSpeed, Aperture, FNumber and many more exif values. It is just a matter of formatting the values as a string that you would like to see. There is no need to use another library.

Take a look at the Helper functions for working with EXIF fields with ImageEn. the pas file is iexEXIFRoutines.pas.

It provides methods to fill string grids, and listviews with exif values automatically. My EBook demos also show how to use it.

It works well here for my Nikon P520.

William Miller
Go to Top of Page

bmesser

United Kingdom
234 Posts

Posted - Dec 30 2013 :  07:14:33  Show Profile  Reply
Hi Uwe

That code you included actually gives a answer of f6 because of the rounding. Without the rounding it gives an answer of f5.6568300723298 which isn't f5.6 and why I mentioned the question someone had raised about it on the internet in the first place.

I had seen this topic in the help and did have a look at the unit iexEXIFRoutines.pas and the function ApexToStr() although for some reason couldn't access it even though I had included it.

So thanks for your answer and I do read the help.

Bruce.
Go to Top of Page

bmesser

United Kingdom
234 Posts

Posted - Dec 30 2013 :  09:03:00  Show Profile  Reply
Hi Bill

I can now access the F number with a reasonable amount of accuracy.

I still can't access the correct ISO number from the image.

The only way I can see to do this in ImageEN is to access the EXIF_MakerNote.GetIntegerIndexed(1,16) value which must come back with a value of 15 which equates to 'Auto' which is wrong. The library I mentioned must have the correct look-up value and also includes a mass of maker note info as well. I suppose I could just alter the case statement by a bit of trial and error.

Bruce.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Dec 30 2013 :  10:06:26  Show Profile  Reply
I think the problems you are seeing is camera specific. Send Nigel a sample image so see if he can fix the problem. I think Nigel wrote the iexEXIFRoutines so it is in his area of expertise.

William Miller
Go to Top of Page

Uwe

284 Posts

Posted - Dec 30 2013 :  10:21:01  Show Profile  Reply
Hi Bruce

Out of curiosity: does a simple FloatToStr(EXIF_FNumber) work for that photo?

Unless you experience this issue with all your photos, I'd agree with William that it's image specific. I have test images of more than 400 different cameras here and so far I've never had a problem retrieving the correct F-stop or ISO. Using ImageEn 4.3.0, by the way.

Uwe
Go to Top of Page

w2m

USA
1990 Posts

Posted - Dec 30 2013 :  10:24:15  Show Profile  Reply
He is using a Canon DSLR camera.

William Miller
Go to Top of Page

Uwe

284 Posts

Posted - Dec 30 2013 :  10:27:46  Show Profile  Reply
Yeah, just saw it and edited my post. Thanks, Bill.

Uwe
Go to Top of Page

bmesser

United Kingdom
234 Posts

Posted - Dec 30 2013 :  12:07:32  Show Profile  Reply
Uwe/Bill

There is nothing special about the image as far as I know. I took it before Christmas with my Canon 6D. I have reduced it in size to a 800 x 533 but the EXIF info has been preserved.

Bruce.

Go to Top of Page

Uwe

284 Posts

Posted - Dec 30 2013 :  12:12:39  Show Profile  Reply
Works for me - using ImageEn 4.3.0:




Can you show us some code? Which ImageEn version?

Uwe
Go to Top of Page

bmesser

United Kingdom
234 Posts

Posted - Dec 31 2013 :  01:26:27  Show Profile  Reply
Uwe

I included the code I was using in my first post which I got straight out of the help:

// Read the ISO value for a Canon camera photo
case ImageEnView1.IO.Params.EXIF_MakerNote.GetIntegerIndexed(1, 16) of
15: ShowMessage('Auto');
16: ShowMessage ('50');
17: ShowMessage ('100');
18: ShowMessage ('200');
19: ShowMessage ('400');
end;

I am using version 4.3.1

Bruce.
Go to Top of Page

bmesser

United Kingdom
234 Posts

Posted - Dec 31 2013 :  03:42:34  Show Profile  Reply
Bill

Thanks for the demo which worked perfectly. I'll have a look at the code in detail to see how you populate the list from the various EXIF fields.

Bruce.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: