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



Last Go to last post Unread Go to first unread post
#1 Posted : Monday, August 20, 2007 2:36:07 AM(UTC)
Matthias Korn

Groups: Registered
Posts: 4

Dear forum,
I'm having performance problems with loading JPG files . I use the Leadtools 14.5. The application is an image browser with RasterImageViewer boxes. MagnifyGlass is used, so reduced sizes are not possible for speeding up.

the code:
DateTime dt2 = DateTime.Now;
Image img = Bitmap.FromFile(path);
TimeSpan ts2 = DateTime.Now - dt2;
DateTime dt = DateTime.Now;
image = Program.codecs.Load(path); // image is IRasterImage
TimeSpan ts = DateTime.Now - dt;

After execution,
ts2 is {00:00:00.0468831}
ts is {00:00:00.5469695}
which shows that for the jpegs, the loading time is too long. The 10/1 ratio is reproducible.

Using the same code for TIFF files results in
ts2 = {00:00:00.0312554}
ts = {00:00:00.0156277}
which is as expected.

Is there a way to speed up the loading of the Jpegs?

The example jpeg is enclosed.

Thanks in advance,
Matthias Korn attached the following image(s):

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 : Tuesday, August 21, 2007 5:28:16 AM(UTC)

Qasem Lubani  

Groups: Guests
Posts: 3,022

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

I tested this and saw 2 cases where this happens:

1. The first time a JPEG is
loaded, it takes extra time because the JPEG loading DLL is not yet
initialized. Loading subsequent images should be much faster, but only as explained in the next point.

2. If you run the test project inside the Visual Studio .NET environment debugger.

This is because of the way LEADTOOLS
DLLs are loaded by the debugger, since these DLLs contain both managed and non-managed code, which causes them to work very slowly inside the VS.NET IDE.

This means when I run the EXE outside the debugger, and load multiple JPEG images, they load much faster.

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-2024, Yet Another Forum.NET
This page was generated in 0.069 seconds.