Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, February 22, 2006 12:10:08 PM(UTC)

travich  
travich

Groups: Registered
Posts: 14


1.  I'm extremely new to image viewing, so bare with me. 

We want to replicate an ACDSee type of functionality, where you find a folder containing pictures and by clicking the next button, you see the next picture in the file.  Does LEAD have any examples of where they've done something like this in .NET?  I've searched the forums with no luck.

 

2.  If I have to write this functionality myself, does anyone have an example of where they've cached the next picture so that when the next button is clicked, the pictures seems to load instantaneously? 

3.  Is there an image viewer control that I can drag and drop on the form?  The examples that they have, the control is being created on the fly.

I appreciate any examples or references.  Again, I'm new, so don't beat me up too bad.  I -did- search the forums.

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, February 23, 2006 5:44:18 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Hello,

You can try to sue the RasterThumbnailBrowser Class and control to automatically generate thumbnails for images in a disk folder (browsing from your folder). For more information, please refer to the LEADTOOLS DotNet v14.5 documentation, and read the following topic:
 - RasterThumbnailBrowser Class

About the drag and drop issue, do you mean that you need an image viewer that supports the drag and drop feature?
If yes, most of LEADTOOLS DotNet controls (RasterImageList, RasterImageViewer, RasterThumbnailBrowser, Etc.) support the Drag and Drop functionality.
For more information, please refer to the LEADTOOLS DotNet documentation and read the following topics:
- Control.AllowDrop Property.
- Control.DoDragDrop Method
- Control.QueryContinueDrag Event

Thanks,
Maen Badwan
 
#3 Posted : Thursday, February 23, 2006 9:44:41 AM(UTC)

travich  
travich

Groups: Registered
Posts: 14


Neither of your answers is really what I'm looking for...

I'm just trying to find a simple example of how to load files into the image object so that I can display them on the viewer. 

I've tried loading an image file using the following:

//Previous declared
Image = codecs.load(fileName);

When I try running this, I get an invalid file format error.  I -don't- get this error when trying to load the same image through the example that's sent with the evalulation version of LEAD software.  Is there a property that I need to set on the codec to allow jpgs?  I don't see such a thing in your example.

The "drag and drop" that I'm referring to has to do with an actual control that I can drag and drop on my .NET IDE.  When I've tried to find a viewer control in .NET, there's not one appearing (or any LEAD control).

Thanks for any other help.

 
#4 Posted : Thursday, February 23, 2006 12:48:48 PM(UTC)

travich  
travich

Groups: Registered
Posts: 14


I am absolutely at my wits end.  I stripped LEAD's C# Basic Features Demo down to the following, and it opens the file.

public bool Load(IWin32Window owner, RasterCodecs codecs, bool autoLoad)

{

FileName = "C:\\Images\\Test-00001.JPG";

int firstPage = 1;

int lastPage = 1;

_image = codecs.Load(FileName, 0, CodecsLoadByteOrder.BgrOrGray, firstPage, lastPage);

return true;

}

 

This works great, but when I try to do something similar in my own application, I get an "invalid file format" when I try to load.  WTF???????!!??!?!????????????  This is all that I'm trying to do:

private void LoadImage(string fileName)

{

IRasterImage Image;

codecs = new RasterCodecs();

Image = codecs.Load(fileName, 0, CodecsLoadByteOrder.BgrOrGray, 1,1);

Viewer.Image = Image;

}

Again, I'm working in C#.NET 2005, Eval vs. 14.5...  What else is there to know?

 

 
#5 Posted : Thursday, February 23, 2006 1:12:13 PM(UTC)

travich  
travich

Groups: Registered
Posts: 14


Y'all should pay me to work for you.

Here's what I figured out.  The RasterCodecs.CodecsPath has to be point to the location of the codec dlls, it doesn't know where they're at on its own.  All I had to do was do the following and my pictures now load:

RasterCodecs.CodecsPath = @"C:\Program Files\LEAD Technologies, Inc\LEADTOOLS EVAL 14.5\Bin\Dotnet\v20";

 

Thank gawd I've figured that out, it only took about three hours to track down WHY I couldn't load a picture.  Sorry to vent, but that was a frustrating find...

 
#6 Posted : Sunday, February 26, 2006 6:40:22 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Hello,

As you figured out, RasterCodecs.CodecsPath property is one of the most important properties when using LEADTOOLS .Net programming interface.

You should make sure that this property points to the correct LEADTOOLS .Net DLLs path on your machine before loading any images.


Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.170 seconds.