Scrolling large images
glynn at gclements.plus.com
Mon Aug 23 22:01:34 EDT 2010
Adam Sjøgren wrote:
> When a large image is displayed in XEmacs, I can't scroll down and see
> the part of the image that isn't room for "on the first page" in the
> Are there any fixes for this?
> Is it a fundamental thing, or something that someone stumbling through
> the code could have a chance to do something about? Where to start?
AFAICT, it's fundamental. XEmacs operates in terms of lines and
columns, and an image is a single line and column.
It should be possible to modify the redisplay/scrolling code to make
it easier to scroll by pixels rather than lines, but you aren't going
to be able to get around the fact that "point" can only move by whole
VM works around the issue by splitting images into strips:
`vm-mime-use-image-strips' is a variable declared in Lisp.
-- loaded from "vm-vars"
*Non-nil means chop an image into horizontal strip for display.
Emacs treats a displayed image as a single large character and cannot
scroll vertically within an image. To work around this limitation VM
can display an image as a series of contiguous horizontal strips that
Emacs' scrolling routines can better handle. To do this VM needs to
have the ImageMagick programs 'convert' and 'identify' installed;
`vm-imagemagick-convert-program' and `vm-imagemagick-identify-program
must point to them.
A nil value means VM should display images without cutting them
There are things which would make VM's approach simpler, e.g. being
able to create a glyph from a rectangular subregion of an image would
eliminate the need to use ImageMagick to slice the image.
Glynn Clements <glynn at gclements.plus.com>
More information about the XEmacs-Beta