错误GDI +中发生一般错误.在保存图片 [英] Error A generic error occurred in GDI+. in save a Picture

查看:111
本文介绍了错误GDI +中发生一般错误.在保存图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我想将ByteArray(image)保存到另一个其他图像的属性项目中
我创建了项目
但如果Lenght Picture2大于65000,则会出现错误:
GDI +中发生一般错误.
我的问题是什么
谢谢

hi everyone
i want save a ByteArray(image)into a propertyitem an other image
i create This project
but if Lenght Picture2 be Upper than 65000 it''s give error :
A generic error occurred in GDI+.
what''s my problem
thank you

推荐答案

您的图片有多大?您提到650000,但不清楚那是否是图像的一侧.

无论大小如何,图像均由每个32位(4字节)的像素表示.如果将图像尺寸乘以4字节深度,则将获得内存中图像的大小,该大小不能超过2GB.

因此,如果您的图片为65000 x 65000像素,则图片为16.9GB.对于GDI来说太大了.
How big is your image?? You mention 650000, but it''s not clear if that''s the size of the image on one side.

Whatever the size, an image is represented by pixels that are 32-bits (4 bytes) each. If you multiply the image dimensions by the 4 byte depth, you get the size of the image in memory, which cannot exceed 2GB.

So, if your image is 65000 by 65000 pixels, your image is 16.9GB. WAY too big for GDI to handle.


这篇关于错误GDI +中发生一般错误.在保存图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆