Hi, I need to create jpeg and gif thumbnails from tiff files. I'm using ImageMagick for that but when a tiff file is jpeg compressed I'm getting errors. I was told that I need to use LibTIFF library. The problem is that I don't have much experience with all of this and really confused. What should I do in order to create previews in my .NET project. Should I use a dll (what dll?) should I use command lines (I couldn't find any command line examples). Thank you very much for your help!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your answer. The problem occurs only if the tiff file has jpeg compression. Both xnview and netpbm's tifftopbm also have problems reading this kind of file. netpbm says: "tifftopnm: don't know how to handle PHOTOMETRIC_YCBCR" and xnview says: "can't read file". I will submit my question to the libtiff mailing list. Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It depends on what you want to achieve. If you want a one-time conversion of tiff files to jpeg or gif, then you can use most converter programs. E.g. with XnView (http://www.xnview.com) it is possible to do such a conversion, even in a batch series. However, if you want to include such a conversion possibility in a more general way in another program, this is probably best done by using a library. I'm not sure that libtiff is the best choice for this (there is no tiff2jpeg program provided with libtiff), but you may get a more authorative answer from the libtiff mailing list (http://www.remotesensing.org/libtiff). Perhaps the netpbm library is more appropriate; you should first convert the tiff file to pnm format and then the pnm file to jpeg or gif.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I need to create jpeg and gif thumbnails from tiff files. I'm using ImageMagick for that but when a tiff file is jpeg compressed I'm getting errors. I was told that I need to use LibTIFF library. The problem is that I don't have much experience with all of this and really confused. What should I do in order to create previews in my .NET project. Should I use a dll (what dll?) should I use command lines (I couldn't find any command line examples). Thank you very much for your help!
Thanks for your answer. The problem occurs only if the tiff file has jpeg compression. Both xnview and netpbm's tifftopbm also have problems reading this kind of file. netpbm says: "tifftopnm: don't know how to handle PHOTOMETRIC_YCBCR" and xnview says: "can't read file". I will submit my question to the libtiff mailing list. Thanks.
It depends on what you want to achieve. If you want a one-time conversion of tiff files to jpeg or gif, then you can use most converter programs. E.g. with XnView (http://www.xnview.com) it is possible to do such a conversion, even in a batch series. However, if you want to include such a conversion possibility in a more general way in another program, this is probably best done by using a library. I'm not sure that libtiff is the best choice for this (there is no tiff2jpeg program provided with libtiff), but you may get a more authorative answer from the libtiff mailing list (http://www.remotesensing.org/libtiff). Perhaps the netpbm library is more appropriate; you should first convert the tiff file to pnm format and then the pnm file to jpeg or gif.