I can duplicate this problem with the CameraGetImages demo.
The problem is that unless the WIAParams.TransferFormat is set to ietfJpeg, the raw image is loaded instead of a jpeg so there is no EXIF data. The earlier versions of ImageEn set the default TransferFormat to ietfJpeg, so the demo worked. To fix this problem set the WIAParams.TransferFormat to ietfJpeg before transferring the image to TImageEnView or before saving the image to disk.
To change the demo so it functions correctly do the following:
{ Select a file, load it, and optionally save it to disk. }
procedure TMainForm.TreeView1Change(Sender: TObject; Node: TTreeNode);
begin
{ What this? This gets the image from the camera and save it without
load the jpeg. This means the image doesn't lose quality.
If the camera stores images using JPEG file format you have to force
transferring the image as a jpeg by setting the WIAParams.TransferFormat.
If the TransferFormat is not set to jpeg, then EXIF Values will not
be available because the image will be in RAW format. The default
WIAParams.TransferFormat is ietfRawBitmap. In earlier versions of
ImageEnIO the default was ietfJpeg so setting the WIAParams.TransferFormat
was not required. }
if CheckBox1.Checked then
begin
{ Force the transferred image to be a Jpeg }
ImageEnView1.IO.WIAParams.TransferFormat := ietfJpeg;
{ Change the folder path to a folder that exists on your hard drive
where you want to save the images. }
ImageEnView1.IO.WIAParams.SaveTransferBufferAs := 'D:\CameraImages\' +
Node.Text + '.jpg';
end
else
ImageEnView1.IO.WIAParams.SaveTransferBufferAs := '';
ImageEnView1.IO.WIAParams.GetItemThumbnail(TIEWiaItem(Node.Data),
ImageEnView2.IEBitmap);
ImageEnView2.Update;
if CheckBox2.Checked then
begin
{ Get Image }
ImageEnView1.IO.WIAParams.ProcessingBitmap := ImageEnView1.IEBitmap;
{ Force the transferred image to be a Jpeg }
ImageEnView1.IO.WIAParams.TransferFormat := ietfJpeg;
ImageEnView1.IO.WIAParams.Transfer(TIEWiaItem(Node.Data), false);
ImageEnView1.Update;
{ Fill EXIF samples frame... Warning- If the WIAParams.TransferFormat is not
set to ietfJpeg then there will not be any exif data }
with ImageEnView1.IO.Params do
begin
Label4.Caption := EXIF_Make;
Label6.Caption := EXIF_Model;
Label8.Caption := EXIF_DateTime;
Label10.Caption := IntToStr(EXIF_ExifImageWidth) + ' x ' +
IntToStr(EXIF_ExifImageHeight);
end;
end;
end;
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development