Re: ValueError: no memory after 4GB

Tim Roberts <[email protected]> Wed, 7 Apr 2021 11:58:12 -0700
Newsgroups gmane.comp.python.reportlab.user
Organization Providenza & Boekelheide, Inc.
Message-ID <[email protected]>
Shaw, Theodore wrote:
>
> I'm trying to convert an SVG to a BMP that's about 100,000 pixels by 
> 100,000 pixels. My code looks like
> ...
> By attempting this conversion with progressively larger files and 
> monitoring the memory usage, I've found that the issue occurs when the 
> memory consumption exceeds about 4GB. I've checked that I'm using a 64 
> bit version of Python and have been able to create large arrays that 
> consume up to 64GB of memory (my total amount of RAM), so it seems 
> like the issue is specific to reportlab.

No, it's actually an issue in Windows.  The Windows GDI BMP engine 
cannot handle bitmaps with coordinates larger than 15 bits (32767).

-- 
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.
smime.p7s (application/pkcs7-signature, 3.3 KB) - not displayed