C# Saving huge images

☆樱花仙子☆ 提交于 2020-01-13 08:20:09

问题


I'm having difficulties when trying to save huge images with C# (I'm talking about over one gigabyte).

Basically I'm trying to do this in parts - I have around 200 bitmap sources and I need a way to combine them before or after encoding them to a .png file.

I know this is going to require lots of RAM unless I somehow stream the data directly from hard drive but I have no idea how to do this either.

Each bitmap source is 895x895 pixels so combining the images after encoding doesn't seem easy because C# doesn't let you create a bitmap with size of 13425 x 13425.


回答1:


This PngCs library (disclaimer: I'm the author) lets you read and write huge PNG images line by line, so that you don't need to keep the full image in memory; perhaps you find it useful.



来源:https://stackoverflow.com/questions/11182948/c-sharp-saving-huge-images

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