Saving a multi frame TIFF

此生再无相见时 提交于 2019-12-01 20:52:27

问题


I load a multiframe TIFF from a Stream in my C# application, and then save it using the Image.Save method. However, this only saves the TIFF with the first frame - how can I get it to save a multiframe tiff?


回答1:


Since you don't provide any detailed information... just some general tips:

Multi-Frame TIFF are very complex files - for example every frame can have a different encoding... a single Bitmap/Image can't hold all frames with all relevant information (like encoding and similar) of such a file, only one at a time.

For loading you need to set parameter which tells the class which frame to load, otherwise it just loads the first... for some code see here.

Similar problems arise when saving multi-frame TIFFs - here you need to work with EncoderParameters and use SaveAdd etc. - for some working code see here.



来源:https://stackoverflow.com/questions/9317879/saving-a-multi-frame-tiff

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!