unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>,
	rms@gnu.org, "Kim F. Storm" <storm@cua.dk>
Subject: Re: image size limit?
Date: Wed, 19 Oct 2005 08:45:39 -0400	[thread overview]
Message-ID: <87ach5wu8c.fsf@stupidchicken.com> (raw)
In-Reply-To: <85ek6hitq3.fsf@lola.goethe.zz> (David Kastrup's message of "Wed, 19 Oct 2005 14:20:20 +0200")

David Kastrup <dak@gnu.org> writes:

>> But it definitely sounds better to scale according to display size
>> rather than frame size (but round up to minimum size e.g. 4096x4096).
>
> It sounds to me like the limits should be configurable, with a
> somewhat conservative default.  Applications where larger dimensions
> might be appropriate (image viewers with provisions for panning, i.e.)
> can allow them in their own buffers using buffer-local settings of the
> variables limiting the size.

Scaling according to display size isn't entirely problem-free either,
because Emacs frames can be put on different X displays ;-)

I think scaling according to frame size is not a great solution, but
it's OK because of the way image loading works.  If the frame is
initially too small, Emacs won't load the image.  But each time you
increase the size of the frame, Emacs checks again, and loads the
image if the size relative to the frame is now OK.  Once an image is
loaded, it's put in the image cache, so it will always be displayed
regardless of the frame size.

The max-image-size code is checked into CVS.  I've set a conservative
value of 6.0 times the frame width and height.  After all, the
original rationale for this feature is to avoid over-allocating memory
in case a malicious image demands a gigantic image widths/heights of
millions of pixels.  In ordinary situations, it shouldn't get in the
way of the user.

  reply	other threads:[~2005-10-19 12:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-11 20:32 image size limit? Chong Yidong
2005-10-11 21:19 ` Kevin Rodgers
2005-10-12 16:24 ` Richard M. Stallman
2005-10-12 17:40   ` Romain Francoise
2005-10-13 20:13     ` Richard M. Stallman
2005-10-14 13:02       ` Chong Yidong
2005-10-15 16:13         ` Richard M. Stallman
2005-10-15 18:33           ` Chong Yidong
2005-10-16 17:36             ` Richard M. Stallman
2005-10-16 22:27       ` Chong Yidong
2005-10-17 17:30         ` Richard M. Stallman
2005-10-17 21:56           ` Chong Yidong
2005-10-18  3:39             ` Richard M. Stallman
2005-10-18 14:33               ` Stefan Monnier
2005-10-19  8:35                 ` Kim F. Storm
2005-10-19 12:20                   ` David Kastrup
2005-10-19 12:45                     ` Chong Yidong [this message]
2005-10-19 20:17                       ` Richard M. Stallman
2005-10-19 12:51                     ` Kim F. Storm
2005-10-19 20:17                       ` Richard M. Stallman
2005-10-19 21:55                         ` Kim F. Storm
2005-10-19 13:27                 ` Miles Bader
2005-10-20  4:54                   ` Richard M. Stallman
2005-10-19  9:02             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ach5wu8c.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@gnu.org \
    --cc=storm@cua.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).