Results 1 to 7 of 7

Thread: multipage tiff

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    7

    multipage tiff

    what controls can be used to load and manipulate multipage tiff images..Anybody worked on this.

  2. #2
    Addicted Member
    Join Date
    Aug 2003
    Posts
    153
    I had to buy a component that dealt with multipage tiff. I couldn't find anything in the classes supplied with the .Net framework. There are a few out there.

  3. #3
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    how much did you pay for the component?
    i did this for a application without any components
    100% .NET code

    i dont have the code with me but i can try to get it if there is enough demand

  4. #4
    Addicted Member
    Join Date
    Aug 2003
    Posts
    153
    I think it was about $250 US.

    But we do alot of image manipulation stuff, and this component had alot more ease of use and file format support than just multipage tiff.

  5. #5
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    this isnt my code(mine is to complicated to follow), not tested..

    it should get u started though
    VB Code:
    1. dim myimg as System.Drawing.Image
    2. myimg = Image.FromFile([FilePath])
    3.  
    4. Dim oFDimension As System.Drawing.Imaging.FrameDimension
    5. oFDimension = New System.Drawing.Imaging.FrameDimension _
    6. (myimg.FrameDimensionsList(0))
    7.  
    8. 'framecount is one based
    9. msgbox("PageCount: " & myimg.GetFrameCount(oFDimension))
    10.  
    11. 'frame/pages are zero based
    12. dim iCount as integer = 0
    13. for iCount to myimg.GetFrameCount(oFDimension))-1
    14. myimg.SelectActiveFrame(oFDimension,iCount)
    15. 'do what you want with the "image" object,
    16. 'if you pass the myimg object out at this point in the loop
    17. ' (like to a picturebox or response.outputstream)
    18. 'you will get the "image" for that page
    19. 'example
    20. myimg.save(Response.Outputstream,
    21. System.Drawing.Imaging.ImageFormat.JPEG)
    22. 'the above will render all the pages to a browser
    23. next

  6. #6

  7. #7

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    7
    I already tried this approach. This works fine with the .tiff which has multiple pages but not multiple frames.

    MUltiFrame .tiff is different from multipage tiff I guess.
    If multipage tiff can be opened with window FaxVIewer , it could be handled by the this piece of code.

    If multiframe tiff which cannot be opened by window FaxViewer but can be opened by some Tiff VIewers like irfanView editor couldnot be handled with this code.

    I could see the subimage information with 'imginfo' command. and could be opened with Tiff Editor. So, I know tiff image is formed correctly.

    ANy other views please?




    Originally posted by kovan
    this isnt my code(mine is to complicated to follow), not tested..

    it should get u started though
    VB Code:
    1. dim myimg as System.Drawing.Image
    2. myimg = Image.FromFile([FilePath])
    3.  
    4. Dim oFDimension As System.Drawing.Imaging.FrameDimension
    5. oFDimension = New System.Drawing.Imaging.FrameDimension _
    6. (myimg.FrameDimensionsList(0))
    7.  
    8. 'framecount is one based
    9. msgbox("PageCount: " & myimg.GetFrameCount(oFDimension))
    10.  
    11. 'frame/pages are zero based
    12. dim iCount as integer = 0
    13. for iCount to myimg.GetFrameCount(oFDimension))-1
    14. myimg.SelectActiveFrame(oFDimension,iCount)
    15. 'do what you want with the "image" object,
    16. 'if you pass the myimg object out at this point in the loop
    17. ' (like to a picturebox or response.outputstream)
    18. 'you will get the "image" for that page
    19. 'example
    20. myimg.save(Response.Outputstream,
    21. System.Drawing.Imaging.ImageFormat.JPEG)
    22. 'the above will render all the pages to a browser
    23. next

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width