Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

How do I get available sub types for a RasterSaveDialogFileFormat?
Started by gthimmes at 05-15-2008 16:32. Topic has 2 replies.

Print Search « Previous Thread Next Thread »
  05-15-2008, 16:32
gthimmes is not online. Last active: 5/14/2008 6:10:20 AM gthimmes

Not Ranked
Joined on 05-14-2008
Posts 5
How do I get available sub types for a RasterSaveDialogFileFormat?
Reply Quote
I am using the FastTwainDemo to put together an application that imports from a twain device and saves into our document file structure. I need to make available to the users an options dialog similar to the RasterSaveDialog, but without the Save As file field because the users will not be able to pick a path in my application. So I have created my own options controls, but I am falling short on a couple areas. I can use this to get a list of available formats:

RasterSaveDialogFileFormatsList _rasterFormatList = new RasterSaveDialogFileFormatsList(RasterDialogFileFormatDataContent.Default);

But I need ot be able to get the sub types for each type so I can make them available for selection. How do I do this? Also, what is the allowed qfactor for each type? I can see how to get the BitsPerPixelList and the default.

I guess another option form me would be if there is a way to make the built in save dialog not show the file path.

Thanks for any help,

Glenn

   Report 
  05-16-2008, 18:21
Walter is not online. Last active: 11/13/2008 12:56:37 PM Walter



Top 25 Posts
Joined on 04-14-2008
Charlotte, NC
Posts 116
Re: How do I get available sub types for a RasterSaveDialogFileFormat?
Reply Quote
Are you looking to support a lot of file types through your dialog or just a select few with the different sub types? The sub-types are enumerated in the Leadtools.WinForms.CommonDialogs.File namespace.

Using RasterSaveDialogFileFormatsList will allow you to create a list of formats. Have you looked at the RasterSaveDialogFileFormat class? You can declare a file format to be of a specific type, i.e. RasterDialogFileTypesIndex.Tiff

I would also suggest checking out the topic "Compression Quality Factors" in the documentation. This should help with your issues with qFactor.
Walter
Technical Support
LEADTOOLS
support@leadtools.com
   Report 
  05-23-2008, 13:04
gthimmes is not online. Last active: 5/14/2008 6:10:20 AM gthimmes

Not Ranked
Joined on 05-14-2008
Posts 5
Re: How do I get available sub types for a RasterSaveDialogFileFormat?
Reply Quote
Thanks for the response. I found what I needed the following way:

My list of available types case from:
RasterSaveDialogFileFormatsList _rasterFormatList = new RasterSaveDialogFileFormatsList(RasterDialogFileFormatDataContent.Default);

From a specific type I could get the available BitsPerPixel from:
_rasterFormatList[i].BitsPerPixelList


For a specific BitsPerPixelList, I can get the subtype like this:
format.BitsPerPixelList[_cmbBitsPerPixel.SelectedIndex].SubFormatsList[i].Name



   Report 
Post
LEAD Support Fo... » Developer » Scanning/Captur... » How do I get available sub types for a RasterSaveDialogFileFormat?

Powered by Community Server, by Telligent Systems