[reportlab-users] [EXTERNAL EMAIL] Re: ValueError: no memory after 4GB
Shaw, Theodore
shaw.th at utexas.edu
Thu Apr 8 13:51:28 EDT 2021
That's a good question. The BMP is the input filetype for a
microfabrication tool that uses 128,814 dpi. 600 dpi is good enough for
photos but far from good enough for photolithography!
>No, it's actually an issue in Windows. The Windows GDI BMP engine
cannot handle bitmaps with coordinates larger than 15 bits (32767).
I have managed to generate an image that's 10,143 x 32,840, so I don't
think it's as simple as whether either dimension exceeds 2^15.
It seems like this use case is fairly far outside of reportlab's typical
use case, so I'm gravitating towards using ImageMagick, which comes with
support for caching areas to disk instead of trying to fit everything in
RAM.
Thanks for the help!
On 4/8/2021 10:27 AM, Mark De Wit wrote:
> Some modern game engines use MegaTextures to enhance/describe the 3D environment, they are easily this kind of size (first iterations were 32'000 by 32'000, they're now up to 128k in size). The engine would use paging to manage memory consumption though...
>
> But from a reportlab perspective, it must be quite the PDF indeed!
>
> Mark
>
> -----Original Message-----
> From: reportlab-users <reportlab-users-bounces at lists2.reportlab.com> On Behalf Of Henning von Bargen
> Sent: 08 April 2021 16:16
> To: reportlab-users at lists2.reportlab.com
> Subject: [EXTERNAL EMAIL] Re: [reportlab-users] ValueError: no memory after 4GB
>
> 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
> I'm just curious:
> WHY do you try to generate such a huge² image?
> I mean, practically every image viewer program would fail with OutOfMemory if a user wants to look at this image.
> Why don't you just keep the SVG?
>
> Just to demonstrate the dimension:
> Say, a colour laser printer uses 600 dpi (which is good enough for photos).
> Then printing your image in this natural dpi resolution would result in a 4.2 m x 4.2 m paper...
> I really cannot imagine a use-case...
>
> Henning
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at lists2.reportlab.com
> https://pairlist2.pair.net/mailman/listinfo/reportlab-users
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at lists2.reportlab.com
> https://pairlist2.pair.net/mailman/listinfo/reportlab-users
>>> This message is from an external sender. Learn more about why this <<
>>> matters at https://links.utexas.edu/rtyclf. <<
More information about the reportlab-users
mailing list