[Top][All Lists]

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

Re: image scaling

From: David Kastrup
Subject: Re: image scaling
Date: Thu, 21 Feb 2008 22:49:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Chong Yidong <address@hidden> writes:

> Stefan Monnier <address@hidden> writes:
>> Looking at the Elisp manual's "38.16.2 Image Descriptors", it seems that
>> we do not support image scaling.
>> I'd like to add such a feature to image-mode.el, but am wondering how we
>> should go about doing it.  Would there be some advantage to provide it
>> at the C level (e.g. if some of the image libs we use already provide
>> the necessary functionality) or should we just bite the bullet and call
>> some external tool like "convert -scale ..." (with the disadvantage that
>> flushing the image cache will not automatically cause the image to be
>> re-scaled).
> I think the cleanest (but not necessarily easiest) approach is to add
> a C level function to rescale an image.  This C function would act on
> the internal pixmap structures and implement its own image scaling
> algorithm.  The trouble with using external library functions is that
> not all of them support rescaling.

Since lot more people concerned about graphics work on those library
functions than on Emacs' graphics, we should be factoring Emacs' image
code in a manner that will allow us to make use of that functionality if
it is given (and possibly be able to use gdk if it is available).
Really: how pixels are passed one by one through Emacs before reaching
the display is a mess.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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