473,840 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.FromIm age(bmp2)

g.Interpolation Mode =
Drawing.Drawing 2D.Interpolatio nMode.HighQuali tyBicubic
g.DrawImage(bmp , 0, 0, bmp2.Width, bmp2.Height)
picturebox1.ima ge = bmp2

Originally I used the getthumbnailima ge 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 interpolationmo de.

Thanks for any help with this!

John

Nov 21 '05 #1
2 3478
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****@informa tik.com> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.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.FromIm age(bmp2)

g.Interpolation Mode =
Drawing.Drawing 2D.Interpolatio nMode.HighQuali tyBicubic
g.DrawImage(bmp , 0, 0, bmp2.Width, bmp2.Height)
picturebox1.ima ge = bmp2

Originally I used the getthumbnailima ge 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 interpolationmo de.

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
5878
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 web (using ASP.NET). However, when I generate the Image object using FromStream (passing in the MemoryStream containing image bytes), an exception of "A generic error occurred in GDI+" is thrown when performing the conversion/save for display....
3
2051
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
2093
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: #--------------------------------------------------------------------------- # RESOURCE USAGE (except WAL) #---------------------------------------------------------------------------
6
10041
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 the client machine, the file type TIFF is associated with Kodak Imaging Preview. This app works on most client machines. When you click on the link, Kodak Imaging Preview will open the TIFF file on the client machine. However, on some machines, the...
50
5756
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
5833
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 for multiple page faxes. I have not been able to locate an example to load in the browser or how to handle multiple image in the one column. 1) Ideally it would be nice to display back in the browser since some may be multiple images. I am not...
1
3459
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 with this code it is often 4000-5000 kb.s. What am I missing? public class EmrTiff : IDisposable { private string fileName; private ArrayList imageContainer = null;
7
3800
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. time / date Nice to have:
0
1239
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 file loaded (I don't know if I load it into an Image object (Image.FromFile()).
0
9698
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10914
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10597
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10656
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7834
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3136
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.