T O P I C R E V I E W |
bmesser |
Posted - Dec 29 2013 : 09:49:53 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.
|
14 L A T E S T R E P L I E S (Newest First) |
bmesser |
Posted - Dec 31 2013 : 03:42:34 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. |
bmesser |
Posted - Dec 31 2013 : 01:26:27 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. |
Uwe |
Posted - Dec 30 2013 : 12:12:39 Works for me - using ImageEn 4.3.0:

Can you show us some code? Which ImageEn version?
Uwe |
bmesser |
Posted - Dec 30 2013 : 12:07:32 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.
 |
Uwe |
Posted - Dec 30 2013 : 10:27:46 Yeah, just saw it and edited my post. Thanks, Bill.
Uwe |
w2m |
Posted - Dec 30 2013 : 10:24:15 He is using a Canon DSLR camera.
William Miller |
Uwe |
Posted - Dec 30 2013 : 10:21:01 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 |
w2m |
Posted - Dec 30 2013 : 10:06:26 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 |
bmesser |
Posted - Dec 30 2013 : 09:03:00 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.
|
bmesser |
Posted - Dec 30 2013 : 07:14:33 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. |
w2m |
Posted - Dec 29 2013 : 11:49:47 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 |
Uwe |
Posted - Dec 29 2013 : 11:38:52 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
|
bmesser |
Posted - Dec 29 2013 : 11:18:01 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. |
w2m |
Posted - Dec 29 2013 : 10:27:23 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 |