Page 1 of 1

About convert dwg to png size limit

Posted: 27 Jun 2017, 06:27
by pujols
Hi,

I convert dwg to png use CADImage.SaveToFile(string, ImageFormat, DRect, Rectangle).

When set image size more than 536870910 or width more than 65535 or height more than 65535
convert to image will fail.

Above number is limit of cad.net or limit of memory?

Re: About convert dwg to png size limit

Posted: 27 Jun 2017, 23:27
by support
Hello,

The Microsoft CLR has a 2 GB maximum object size limit by default, even when you run a 64-bit managed application on a 64-bit Windows operating system. The limitation applies to each single object, not the total size of all objects.
Knowing the default pixel format for bitmap (32 bit per pixel), you can calculate the maximum quantity of pixels in the output image:

2,147,483,648 bytes / 4 bytes (per pixel) = 536,870,912 pixels


Mikhail