Welcome to LEAD Support Forum Login | Register | Faq  

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

Re: Unable to get preview in raster open dialog
Started by alwayssmiling at 02-19-2007 4:56. Topic has 6 replies.

Print Search « Previous Thread Next Thread »
  02-19-2007, 4:56
alwayssmiling is not online. Last active: 8/20/2008 9:43:16 AM alwayssmiling

Top 50 Posts
Joined on 02-13-2007
Posts 36
Unable to get preview in raster open dialog
Reply Quote

Hi,

        With the help raster open dialog im loading the image. In this dialog i want to get the image preview. So i set the property of rasterdialog preview property to true. But even though i set that property, its unable to display the preview. Wat may be the prob with it. Any extra properties i need to set to get the preview?

Help me to solve this prob

Thank u.

 


   Report 
  02-20-2007, 15:23
GregR is not online. Last active: 1/2/2009 9:03:27 AM GregR



Top 10 Posts
Joined on 05-31-2006
In House
Posts 1,806
Re: Unable to get preview in raster open dialog
Reply Quote
What LEADTOOLS version and interface (API, COM, .NET libraries, etc.) are you using?

I would suggest taking a look at the demo projects that ship with the toolkit since they typically display the preview in the open dialog.  The code for any of the demo projects are available in the Examples directory of your LEADTOOLS installation.

Greg Ross
LEADTOOLS Technical Support
   Report 
  09-27-2007, 15:28
mbsiehs is not online. Last active: 6/24/2008 8:44:40 PM mbsiehs

Top 75 Posts
Joined on 09-27-2007
Posts 32
Re: Unable to get preview in raster open dialog
Reply Quote
I'm having the same problem. 

I'm using the .NET library (32 bit) and I'm running on .NET 2.0.  I'm using version 15 of Leadtools. 

The following code is placed in a .cs file that uses Leadtools, Leadtools.Codecs and Leadtools.WinForms.CommonDialogs.Form as does the MainDemo example.  In fact, if I copy and paste the following code in the body of the corresponding method in the example, the preview works with the same image.  All of my .dlls are the same version as those used in the example.

What variable am I missing?  I get the preview window, but when I select an image I get the wait cursor for a while and then nothing in the preview.

Thanks.
Matt

            RasterCodecs.Startup();
            RasterOpenDialog ofd = new RasterOpenDialog(new RasterCodecs());

            ofd.ShowPreview = true;
            ofd.PreviewWindowVisible = true;
            ofd.Title = "LEADTOOLS Open Dialog";

            if (ofd.ShowDialog(this.parent) == DialogResult.OK)
            {

            }

            RasterCodecs.Shutdown();


   Report 
  09-27-2007, 15:54
BoydP is not online. Last active: 1/18/2008 7:04:31 PM BoydP



Top 25 Posts
Joined on 08-22-2007
Posts 230
Re: Unable to get preview in raster open dialog
Reply Quote
Do you have the proper codec dlls in your applications bin directory or added as a reference to the project?


Boyd Perkins
LEADTOOLS Technical Support
   Report 
  09-27-2007, 16:50
mbsiehs is not online. Last active: 6/24/2008 8:44:40 PM mbsiehs

Top 75 Posts
Joined on 09-27-2007
Posts 32
Re: Unable to get preview in raster open dialog
Reply Quote
Yes, I have added the applicable references to the project and Visual Studio has placed them in the bin directories.

I may have the piece of evidence that may solve this.  When I try to get the CodecImageInfo after the dialog returns DialogResult.OK, I get a crash that says "Invalid file format" and I'm trying to load up a .jpg.  That may be a clue.

Thanks for such a prompt response.

Matt

   Report 
  09-27-2007, 17:08
BoydP is not online. Last active: 1/18/2008 7:04:31 PM BoydP



Top 25 Posts
Joined on 08-22-2007
Posts 230
Re: Unable to get preview in raster open dialog
Reply Quote
From the description of the problem it sounds like you are missing required dlls.  To load jpeg files you will need to have Leadtools.Codecs.Cmp.dll in your applications bin directory.  For more information on required files for loading different image formats please refer to the .NET help file section "Files to be included with your application".


Boyd Perkins
LEADTOOLS Technical Support
   Report 
  09-27-2007, 17:32
mbsiehs is not online. Last active: 6/24/2008 8:44:40 PM mbsiehs

Top 75 Posts
Joined on 09-27-2007
Posts 32
Re: Unable to get preview in raster open dialog
Reply Quote
I did add Leadtools.Codecs.Cmp.dll to my project after reading the reference earlier with no luck.  I added it again and it worked.  The difference is -- I had to reboot Visual Studio.  Thanks Bill.

Thanks for your help, LEAD.

Matt

   Report 
Post
LEAD Support Fo... » Developer » Common Dialogs » Re: Unable to get preview in raster open dialog

Powered by Community Server, by Telligent Systems