问题描述
我试图在c#中创建一个.tga图像转换器,我收到此消息:
System.OutOfMemoryException:'内存不足。'
我尝试过:
System.Drawing.Image image = System.Drawing.Image.FromFile(@ C:thefiles / thing.tga);
image.Save(@C:\ Users \ Me\Desktop\imagetest.png,System.Drawing.Imaging.ImageFormat。 Png);
因此TGA图像本身不受支持,需要通过自己的代码或使用库来处理。
i im trying to make a .tga image converter in c# and i get this message:
System.OutOfMemoryException: 'Out of memory.'
What I have tried:
System.Drawing.Image image = System.Drawing.Image.FromFile(@"C:thefiles/thing.tga");
image.Save(@"C:\Users\Me\Desktop\imagetest.png",System.Drawing.Imaging.ImageFormat.Png);
So TGA images are not natively supported and require to be handled by own code or using a library.
这篇关于如何将.tga图像转换为.png的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!