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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TSaveImageEnDialog: iesfImagesOnly defaulting to PNG?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PeterPanino Posted - Nov 07 2024 : 02:40:50
My SaveImageEnDialog correctly shows all image formats, but unfortunately, it always defaults to the SVG format (while I want it to default to the PNG format):



procedure TForm1.mSaveImageClick(Sender: TObject);
var
  SaveImageEnDialog1: ieopensavedlg.TSaveImageEnDialog;
begin
  // Create the dialog at runtime
  SaveImageEnDialog1 := TSaveImageEnDialog.Create(nil);
  try
    // Todo: display all image formats in the TSaveImageEnDialog with iesfImagesOnly, defaulting to PNG:
    SaveImageEnDialog1.ShowFormats := iesfImagesOnly; // this does work
    //SaveImageEnDialog1.DefaultExt := 'png';         // this does not work

    // Attach the dialog to the ImageEnView's IO component:
    SaveImageEnDialog1.AttachedImageEnIO := ImageEnView1.IO;

    // Execute the dialog
    if SaveImageEnDialog1.Execute() then
      ImageEnView1.IO.SaveToFile(SaveImageEnDialog1.Filename);
  finally
    // Free the dialog to prevent memory leaks
    SaveImageEnDialog1.Free;
  end;
end;


How can I make it default to the PNG format?
2   L A T E S T    R E P L I E S    (Newest First)
PeterPanino Posted - Nov 08 2024 : 07:39:07
Hi Nigel

Thanks, now it works as intended.
xequte Posted - Nov 07 2024 : 16:29:12
Hi Peter

Please use:

SaveImageEnDialog1.FilterDefault := ioPNG;

http://www.imageen.com/help/TOpenImageEnDialog.FilterDefault.html

Nigel
Xequte Software
www.imageen.com