About convert dwg to png size limit

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
pujols
Posts: 4
Joined: 24 May 2017, 10:03

About convert dwg to png size limit

Post by pujols » 27 Jun 2017, 06:27

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?

support
Posts: 3253
Joined: 30 Mar 2005, 11:36
Contact:

Re: About convert dwg to png size limit

Post by support » 27 Jun 2017, 23:27

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
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply