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
 ImageEnFolderMView1GetTextEx and EXIF_DateTimeDigitized
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

John

USA
94 Posts

Posted - Mar 13 2022 :  03:18:38  Show Profile  Reply
Hello

I am scanning 35mm film utilizing a Nikon scanner that assigns a date to the EXIF_DateTimeDigitized parameter of the digitized image. I display these images in an ImageEnFolderMView component and allow the user to select via ComboBoxes what is displayed in the DefaultTopText, DefaultInfoText and DefaultBottomText parameters.

If the default text parameter is iedtCustom then I wish to display the EXIF_DateTimeDigitized parameter of the respective image in the ImageEnFolderMView component. I am utilizing the ImageEnFolderMView1GetTextEx event to do this but have been unsuccessful in acquiring the EXIF_DateTimeDigitized value for the respective image from within this event. Any help would be appreciated.

procedure TformPhotoCatalog.ImageEnFolderMView1GetTextEx(Sender: TObject;
  Index: Integer; Position: TIEMTextPos; var Text: WideString; Font: TFont;
  var BackgroundStyle: TBrushStyle; var BackgroundColor: TColor;
  var TruncSide: TIEMTruncSide);
var
  tempFileExt: String;
begin
  tempFileExt := ExtractFileExt( Text );
 if IEExtToFileFormat( tempFileExt ) = ioJPEG then
    begin
     if  Position = iemtpTop then
        begin
          if ImageEnFolderMView1.DefaultTopText = iedtCustom then
            begin
             Text := This is where I need to acquire the EXIF_DateTimeDigitized value of the respective image;
            end;
        end
      else
        begin
           if  Position = iemtpInfo  then
              begin
                if ImageEnFolderMView1.DefaultInfoText = iedtCustom then
                  begin
                    Text := see above
                  end;
              end
            else
              begin
               if  Position = iemtpBottom  then
                  begin
                    if ImageEnFolderMView1.DefaultBottomText = iedtCustom then
                      begin
                        Text := see above
                      end;
                  end;
              end;
        end;
end;

xequte

38608 Posts

Posted - Mar 13 2022 :  21:41:44  Show Profile  Reply
Hi John

I don't recommend your acquire the information in the OnGetTextEx() because it is called often (unless you are willing to cache it).

I think you are better to store the EXIF_DateTimeDigitized value in the Image info in the TImageEnMView.

You don't mention what method you use to fill your TImageEnMView, but you could, for instance, set the image create date to your EXIF_DateTimeDigitized value after adding each image.

https://www.imageen.com/help/TImageEnMView.ImageCreateDate.html


Note: if you are filling the control from a folder then by default ImageCreateDate will already be set to the EXIF date ( https://www.imageen.com/help/TIOParams.EXIF_DateTimeOriginal2 ).


Alternatively, you can use one of the image info fields to store custom data, e.g.

https://www.imageen.com/help/TImageEnMView.ImageUserPointer.html



Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: