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
 SaveImageEnDialog

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
klausdoege Posted - Sep 18 2013 : 05:41:28
Hello,

when i use:
SaveImageEnDialog1.FilterIndex:=5; // *.bmp
SaveImageEnDialog1.FileName:='';
if SaveImageEnDialog1.Execute then ;
Then all is OK, Filter is *.bmp.

when i use:
SaveImageEnDialog1.FilterIndex:=5; // *.bmp
SaveImageEnDialog1.FileName:='TestScan';
if SaveImageEnDialog1.Execute then ;
Then the Filter is *.jpg.

That is badly if I scan many pictures, and as BMP would like to store.
And the name consecutive is, for example: Scan1.bmp, scan2.bmp,...
Why does Filterindex have no priority here?

Klaus
www.klausdoege.de
3   L A T E S T    R E P L I E S    (Newest First)
klausdoege Posted - Sep 19 2013 : 00:52:36
Hello Nigel,

thanks for information,
this help me, i will try it.

Klaus
www.klausdoege.de
xequte Posted - Sep 18 2013 : 12:44:52
Hi

It is better to use FilterDefault than FilterIndex:

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


SaveImageEnDialog1.FilterDefault := ioBmp;
SaveImageEnDialog1.FileName:='';
if SaveImageEnDialog1.Execute then...

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
w2m Posted - Sep 18 2013 : 08:50:59
I think if you want bitmaps then add the extension to the filename. I think the filename and extension takes priority over the filter.
FilterIndex specifies what file format to select by default.
From the Help File:
The InitialFileName extension, if specified, in the second parameter, will over-ride the specified index.

If you change the filter in the dialog then the extension of the filename will change to match the filter. But if you change the extension of the filename the filter does not change to match the extension.

So it is best to use a full filename with extension:
SaveImageEnDialog1.FileName:='TestScan.bmp'; When you do this you ensure the file will always be a bitmap.

Personally, I like to use the SavePictureDialog and also use IERegisterFormats to register the imageen supported file types with TPicture. That way you get a modern dialog that matches the operating system. With the SavePictureDialog you can also set the Default extension, so if someone does not add an extension to the filename, the file will be saved with the specified default extension.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html