[Top][All Lists]

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

Re: image scaling

From: Miles Bader
Subject: Re: image scaling
Date: Thu, 21 Feb 2008 18:10:53 +0900

"Mathias Dahl" <address@hidden> writes:
>>  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).
> It would be really good to have such a feature as I think it would
> make browsing images in image-dired's thumbnail buffer (display some
> large images there and use SPC and DEL to go back and forth to see
> what I mean) much quicker. At least I guess it would be quicker to do
> this natively inside Emacs than using convert to scale the image as we
> do now.

In addition, I think it's a bit dodgy to rely on specific programs --
"convert", for instance is part of imagemagick, which is a
humongous/bloated package, so I don't have it installed on my home
system (even though it's a GNU/Linux system, where you might otherwise
expect to find it installed).  I imagine it's simply not installed at
all on many non-GNU systems, or hard to find even when it is installed.

Scaling images isn't all that hard, even if you try to do a good job
(using a filter to avoid aliasing etc), so I think it would be fine to
do it in C code.

[We could optionally try to use library calls to do it when those
libraries will be linked into Emacs anyway, e.g., gtk-related libs.]


The key to happiness
 is having dreams.      [from a fortune cookie]

reply via email to

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