+ #define MAX_IMAGE_SIZE 100000
    + EMACS_INT Vmax_image_size;

100000 as a limit of linear dimension is too large.
A square image 100000-1 on each side will be 10 billion pixels,
far too large to fit in a 32 bit machine.
Such a limit should be more like 3000.  (That would allow
almost 10 million pixels, which is still very big.)

But I don't think this limit should be absolute.  I think it should be
specified as a multiple of the frame height and width, and it should
be given as a floating point number.  I'd suggest 2.0 as the default
for this ratio.

The error messages should say "Image too large"
rather than "Invalid image size".


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to