Very slow performance displaying Tiff file...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • johnb41

    #1

    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

  • Ken Tucker [MVP]

    #2
    Re: Very slow performance displaying Tiff file...

    Hi,

    Maybe this will help.







    Ken
    -------------------------
    "johnb41" <orders@informa tik.com> wrote in message
    news:1118251057 .009138.296830@ 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


    Comment

    • johnb41

      #3
      Re: Very slow performance displaying Tiff file...

      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

      Comment

      Working...