473,406 Members | 2,336 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Very slow performance displaying Tiff file...

In my app, I need to open up a multipage tiff file, and also display
it's thumbnail images IN HIGH QUALITY. (High Quality meaning
anti-aliased, and looking good; not rough and pixely) The thumbnail
images are displayed in a ListView control. (I go through each page of
the file, create a thumbnail of it, and put it into an ImageList. Then
i hook that imagelist up to the ListView.)

It works fine, but it is VERY slow. Creating and displaying the
thumbnails for a 50-page file takes up to 39 seconds. I got it down to
22 seconds, but the quality was unusable.

In comparison, I opened up the same 50-page tiff in the efax viewer
(www.efax.com), and it opened up in a blink of an eye; pretty much
instantly.

Is it slow because .NET is just slow in this area, or am I doing
something wrong?

Here's my general workflow for displaying a SINGLE tiff. (to create 50
thumbnails, i just do some looping and adding to an ImageList control.)

Dim bmp As New Bitmap("c:\aaa\tiff\3soft-2-7-05.tif")
Dim bmp2 As New Bitmap(100, 150)
Dim g As Graphics = Graphics.FromImage(bmp2)

g.InterpolationMode =
Drawing.Drawing2D.InterpolationMode.HighQualityBic ubic
g.DrawImage(bmp, 0, 0, bmp2.Width, bmp2.Height)
picturebox1.image = bmp2

Originally I used the getthumbnailimage method of the Image object to
do this. That was about just as slow as the method above. But it
didn't allow me to change the interpolationmode.

Thanks for any help with this!

John

Nov 21 '05 #1
2 3444
Hi,

Maybe this will help.

http://www.bobpowell.net/highqualitythumb.htm

http://www.bobpowell.net/addframes.htm

http://www.bobpowell.net/generating_multipage_tiffs.htm

Ken
-------------------------
"johnb41" <or****@informatik.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
In my app, I need to open up a multipage tiff file, and also display
it's thumbnail images IN HIGH QUALITY. (High Quality meaning
anti-aliased, and looking good; not rough and pixely) The thumbnail
images are displayed in a ListView control. (I go through each page of
the file, create a thumbnail of it, and put it into an ImageList. Then
i hook that imagelist up to the ListView.)

It works fine, but it is VERY slow. Creating and displaying the
thumbnails for a 50-page file takes up to 39 seconds. I got it down to
22 seconds, but the quality was unusable.

In comparison, I opened up the same 50-page tiff in the efax viewer
(www.efax.com), and it opened up in a blink of an eye; pretty much
instantly.

Is it slow because .NET is just slow in this area, or am I doing
something wrong?

Here's my general workflow for displaying a SINGLE tiff. (to create 50
thumbnails, i just do some looping and adding to an ImageList control.)

Dim bmp As New Bitmap("c:\aaa\tiff\3soft-2-7-05.tif")
Dim bmp2 As New Bitmap(100, 150)
Dim g As Graphics = Graphics.FromImage(bmp2)

g.InterpolationMode =
Drawing.Drawing2D.InterpolationMode.HighQualityBic ubic
g.DrawImage(bmp, 0, 0, bmp2.Width, bmp2.Height)
picturebox1.image = bmp2

Originally I used the getthumbnailimage method of the Image object to
do this. That was about just as slow as the method above. But it
didn't allow me to change the interpolationmode.

Thanks for any help with this!

John
Nov 21 '05 #2
Thanks for the links to that very informative site. I'll spend alot of
time there.

Unfortunately it looks like i'm doing the basics correctly. So it
looks like currently .NET just isn't able to generate graphics very
fast. But if anyone knows a technique to create many thumbnail images
(or non thumbnails) lightening fast, please post it here! 39 seconds
for a 50 page tiff is just uncalled for, when other apps do it
instantly. :(

John

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: T. Davis | last post by:
In C#, I am able to successfully stream a TIFF image that comes from a BLOB field in a database, save it to file, then convert the pages within TIFF file into jpegs (using GDI+) and display on the...
3
by: J Cristancho | last post by:
I would like to know how to display and manipulate TIFF and multipage TIFF Files in my ASP.NET Applications. I know there's third party controls, but I'd like to do it myself Thanks!!!
3
by: Mario Soto | last post by:
Hi. i hava a postresql 7.4.2 in a production server. tha machine is a Pentium IV 2,6 GHZ AND 1 GB IN RAM with lINUX RH 9.0. The postresql.conf say: ...
6
by: qysbc | last post by:
I have a web page and there is a link to open a TIFF file. The way I do it is to have the server code open a binary stream, set the content type to "image/tiff" and call Response.BinaryWrite. On...
50
by: diffuser78 | last post by:
I have just started to learn python. Some said that its slow. Can somebody pin point the issue. Thans
3
by: CD | last post by:
An application is logging faxes sent in SQL2000 image column type. I have found code on the net but what it is doing is prompting to save to local which is fine for single page image. Not good...
1
by: Stedak | last post by:
I have the following class I use to save Tiff's. The problem I have with it is that the final size of the images are very large. If we scan directly to a file the final tiff may be 600-900 kb.s but...
7
by: Ben | last post by:
Hi We are looking for a component that offers that offers the below for Tiff files: Image clean-up (deskew, despeckle) Printing capabilities from VB The ability to add text to image, e.g....
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi misters, I have an WinForms application, and I am currently trying to load a TIFF file that contains about 70, 90 o more frames and show it in my form like thumbnails. Once I have the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.