[Top][All Lists]

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

Re: imagemagic in image-mode and image-dired-thumbnail-mode?

From: Vitalie Spinu
Subject: Re: imagemagic in image-mode and image-dired-thumbnail-mode?
Date: Wed, 17 Jul 2013 09:29:12 +0200
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

 >> Stefan Monnier <address@hidden>
 >> on Tue, 16 Jul 2013 17:26:45 -0400 wrote:

 >> So the proposal is to rewrite all those transform functions into a
 >> consistent image transform api and move them into image.el. Then add
 >> interactive transformation commands to image-mode.el, iimage.el,
 >> image-dired.el, gnus etc that will rely on those.

 > That sounds good.

 >> Of course all the above will work only with imagemagick support.

 > Actually, I wonder if it can't be made to work for non-imagemagick
 > images: by operating on image-specs, it should be possible to make the
 > code do things like "extract the filename, pass the file to `convert'
 > and create a new image-spec for that temp file", while on imagemagick
 > images it would just fiddle with the paramters like :height.

Yes, this is how image-dired-thumbnail-mode works. It comes to
bookkeeping original file metadata which could be done in the image data
structure itself. 

The transform api and manipulation UI is almost finished. I will post it
later today. What I am doing right now is converting the image to
imagemagick type whenever user requests a transformation of any
sort. This works very well with the drawback that the image is loaded
twice once as original type and then as imagemagick. I don't feel any
difference in speed of conversion though.

To avoid this, I have create-image-prefer-type which can take
'imagemagick or nil. In the future it can be extended to other
back-ends, if any. This variable takes effect only when create-image is
called with no explicit TYPE argument. Is this a right approach?


reply via email to

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