emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: image size limit?


From: Richard M. Stallman
Subject: Re: image size limit?
Date: Thu, 13 Oct 2005 16:13:31 -0400

    For some image types, it is a simple matter of passing to the library
    the limits Emacs wants to set.  For libpng, we could use
    png_set_user_limits() to set our maximum width/height.  (libpng also has
    a built-in default limit of 1 million pixels in both dimensions.)

    For other libraries, the application can set the maximum amount of
    memory to allocate, see for example libjpeg's `max_memory_to_use' and
    `max_alloc_chunk'.

    Getting things right for all image types will probably be tricky...

If we handle them one by one, it won't be terribly tricky.
We could have one limit for memory size of an image, and another limit
for the width and height as a ratio to those of the window.
Then for each image type it would use whichever of those can be used.

Would you like to implement this for some image types for which it is easy
to do?

Then we could ask the developers of the other libraries to add
similar features.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]