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
 Camera Get Images demo
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

John

USA
94 Posts

Posted - Sep 12 2014 :  04:35:45  Show Profile  Reply
Hello

Delphi XE5 and ImageEn 5.1.1

The following questions relate to utilizing the CameraGetImages demo with the get image check box checked. When an image is selected from the tree view two problems arise that I do not know how to resolve.

1) The progress bar does not function while the image is being loaded into the ImageEnView component. This is necessary to give feed back to the user. In particular, for large RAW images loading can take an extended period of time and the lack of visible feed back is disconcerting.

2) after the new image is loaded, the EXIF samples frame does not fill with data, label4, label6, lable8 and lable10 remain empty.


Does anyone have suggestions as to how to resolve the above issues?

TIA

John

xequte

39312 Posts

Posted - Sep 14 2014 :  22:15:29  Show Profile  Reply
Hi John

Regarding 2, do the labels just show with blank data?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

John

USA
94 Posts

Posted - Sep 17 2014 :  05:37:09  Show Profile  Reply
Nigel

A)

// fill EXIF samples frame
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);

Yes, the return values are blank for labels 4, 6, and 8. The return value for Label10 is 0 x 0;

I am using a Canon EOS-1 Mark II.

TIA

John
Go to Top of Page

xequte

39312 Posts

Posted - Sep 17 2014 :  16:22:24  Show Profile  Reply
OK, if you reload the image (e.g. using the ImageEn EXIF demo) does the EXIF data show there?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

John

USA
94 Posts

Posted - Sep 17 2014 :  20:10:55  Show Profile  Reply
Nigel

A search for reload or reloadImage in the ImageEn HTML help shows ImageEnMView.Reload. However, (as initially stated) I am using the CameraGetImage demo which does not contain an ImageEnMView component.

If I perform a ImageEnView.Update in a SpeedButton.OnClick event the labels remain empty.

TIA

John
Go to Top of Page

w2m

USA
1990 Posts

Posted - Sep 18 2014 :  07:12:38  Show Profile  Reply
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
Go to Top of Page

xequte

39312 Posts

Posted - Sep 18 2014 :  19:20:59  Show Profile  Reply
Nice catch, Bill,

I will update the demo.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

John

USA
94 Posts

Posted - Sep 27 2014 :  13:31:50  Show Profile  Reply
Thank you for the explanation Bill

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