问题
We are creating a client in Silverlight that will show a lot of TIFF images. Silverlight natively do not support TIFF. I need a control/class to convert tiff to jpg in runtime inside the Silverlight client. Any idea?
回答1:
In Silverlight forum last friday I received this post:
Re: How to Convert TIFF to JPG Inside Silverlight, client side, using a control or a class/function? 12-18-2009 5:38 PM |
If you're willing to use a third-party library, check out ImageGear for Silverlight provided by Accusoft Pegasus. It's a 100% managed Silverlight toolkit (http://www.accusoft.com/ig-silverlight.htm), and runs entirely on the client. TIFF support is included (among lots of other formats).
Hope this helps,
Casey
回答2:
I was successful displaying TIFFs in Silverlight. It's easy to port the free LibTiff.NET library to Silverlight, just 3-4 minor tweaks required.
The library itself is quite legacy-like and raw to use and one still needs to have some knowledge about the inner workings of the TIFF format in order to be able to extract the image data the way one needs it.
But it's doable and the bits and pieces can then be chiseled into a WriteableBitmap
.
回答3:
Not sure you are interested in solution by now, but we've just released LibTiff.Net 2.0 with Silverlight support, improved documentation and samples.
There is Silverlight Test Application in source package that shows how to create WriteableBitmap from TIFF images in Silverlight. Maybe it will help you or others.
来源:https://stackoverflow.com/questions/1923140/how-to-convert-tiff-to-jpg-inside-silverlight-client-side-using-a-control-or-a