what controls can be used to load and manipulate multipage tiff images..Anybody worked on this.
Printable View
what controls can be used to load and manipulate multipage tiff images..Anybody worked on this.
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.
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
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.
this isnt my code(mine is to complicated to follow), not tested..
it should get u started though
VB Code:
dim myimg as System.Drawing.Image myimg = Image.FromFile([FilePath]) Dim oFDimension As System.Drawing.Imaging.FrameDimension oFDimension = New System.Drawing.Imaging.FrameDimension _ (myimg.FrameDimensionsList(0)) 'framecount is one based msgbox("PageCount: " & myimg.GetFrameCount(oFDimension)) 'frame/pages are zero based dim iCount as integer = 0 for iCount to myimg.GetFrameCount(oFDimension))-1 myimg.SelectActiveFrame(oFDimension,iCount) 'do what you want with the "image" object, 'if you pass the myimg object out at this point in the loop ' (like to a picturebox or response.outputstream) 'you will get the "image" for that page 'example myimg.save(Response.Outputstream, System.Drawing.Imaging.ImageFormat.JPEG) 'the above will render all the pages to a browser next
and of course here is a better article then just plain code
http://www.doitin.net/svICdemo3.htm
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?
Quote:
Originally posted by kovan
this isnt my code(mine is to complicated to follow), not tested..
it should get u started though
VB Code:
dim myimg as System.Drawing.Image myimg = Image.FromFile([FilePath]) Dim oFDimension As System.Drawing.Imaging.FrameDimension oFDimension = New System.Drawing.Imaging.FrameDimension _ (myimg.FrameDimensionsList(0)) 'framecount is one based msgbox("PageCount: " & myimg.GetFrameCount(oFDimension)) 'frame/pages are zero based dim iCount as integer = 0 for iCount to myimg.GetFrameCount(oFDimension))-1 myimg.SelectActiveFrame(oFDimension,iCount) 'do what you want with the "image" object, 'if you pass the myimg object out at this point in the loop ' (like to a picturebox or response.outputstream) 'you will get the "image" for that page 'example myimg.save(Response.Outputstream, System.Drawing.Imaging.ImageFormat.JPEG) 'the above will render all the pages to a browser next