Click here to Skip to main content
15,912,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

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.
 
Share this answer
 
Comments
sinaone 17-Feb-12 10:45am    
thank you for your response
but Noe dear, first i change picture2 to Byte Array and lenght Byte Array is upper 65000 byte and i have problem to this
because if Lenght Picture2 be Upper than 65000 it's give error :
A generic error occurred in GDI+.
thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900