unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: support for image count in imagemagick
       [not found] ` <87fx1gtn9p.fsf@mail.jurta.org>
@ 2010-07-01 10:40   ` joakim
  2010-07-01 17:32     ` Mathias Dahl
  0 siblings, 1 reply; 3+ messages in thread
From: joakim @ 2010-07-01 10:40 UTC (permalink / raw)
  To: Juri Linkov; +Cc: Emacs development discussions

Juri Linkov <juri@jurta.org> writes:

> Sorry, I have not yet tried to recompile ImageMagick from source code.
> Do you think dynamic loading will allow using ImageMagick functions
> without recompiling it?

Now I tried to recompile imagemagick 6.6.8 because i wanted to see if
the beta was any better than the released version.

It was pretty easy, I just did ./configure && make install.
It then install to /usr/local, which means it doesnt destroy the distro
packaged version.

then I configured Emacs like this:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./configure --with-imagemagick

Emacs will then pick up the imagemagick in /usr/local rather than the
distro packaged one in /usr/lib

This method ought to work with Ubuntu also, but I didnt try myself. Of
course you need the build deps of imagemagick also. On fedora you do
yum-builddep, but on ubuntu I think you do "apt-get build-dep"

I use the imagemagick feature daily, so its prety stable. I tweak the
Emacs defaults so ImageMagick is used also for jpegs, and Ive tweaked
image-mode a bit so it can scale images to fit window when loading.


The big thing that doesnt work is opening a djvu or pdf bundle. This is
because by default imagemagick renders each and every page in the bundle
on loading, so Emacs dies from over-eating. Ive got some help from the
imagemagick devs:

http://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=16502

But I still got the same issue when trying the book.djvu[1] syntax.
I havent tried the (image_info->number_scenes=1; image_info->scene=2)
aproach yet.



>> I implemented initial support for image count in image bundle files, as
>> you suggested some time ago.
>>
>> This now works:
>>
>> ELISP> (image-metadata (create-image "/home/joakim/Download/Cleaning Instructions fi-5120C.pdf"))
>> (count 2)
>>
>> I think its the same as the way it works for gif right?
>>
>> Now to figure out how to show a particular image conveniently...
>
> You could look how create-animated-image displays particular images
> from the set of images.
-- 
Joakim Verona



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: support for image count in imagemagick
  2010-07-01 10:40   ` support for image count in imagemagick joakim
@ 2010-07-01 17:32     ` Mathias Dahl
  2010-07-01 18:59       ` joakim
  0 siblings, 1 reply; 3+ messages in thread
From: Mathias Dahl @ 2010-07-01 17:32 UTC (permalink / raw)
  To: joakim; +Cc: Juri Linkov, Emacs development discussions

> I use the imagemagick feature daily, so its prety stable. I tweak the
> Emacs defaults so ImageMagick is used also for jpegs, and Ive tweaked
> image-mode a bit so it can scale images to fit window when loading.

I have been following this work with only casual interest (I tend to
ignore things that are not "standard" because I cannot rely on it
being there) but as the original author of `image-dired' I wonder if
it is time to add on option to it to use the imagemagick stuff if
available. For example, it is quite time consuming when `convert' is
called to resize an image to fit in the display window.

Or has anyone already started to look at this, or even done it?

/Mathias



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: support for image count in imagemagick
  2010-07-01 17:32     ` Mathias Dahl
@ 2010-07-01 18:59       ` joakim
  0 siblings, 0 replies; 3+ messages in thread
From: joakim @ 2010-07-01 18:59 UTC (permalink / raw)
  To: Mathias Dahl; +Cc: Juri Linkov, Emacs development discussions

Mathias Dahl <mathias.dahl@gmail.com> writes:

>> I use the imagemagick feature daily, so its prety stable. I tweak the
>> Emacs defaults so ImageMagick is used also for jpegs, and Ive tweaked
>> image-mode a bit so it can scale images to fit window when loading.
>
> I have been following this work with only casual interest (I tend to
> ignore things that are not "standard" because I cannot rely on it
> being there) but as the original author of `image-dired' I wonder if
> it is time to add on option to it to use the imagemagick stuff if
> available. For example, it is quite time consuming when `convert' is
> called to resize an image to fit in the display window.
>
> Or has anyone already started to look at this, or even done it?

It sounds like a good idea. Maybe you can try to implement it in the
imagemagick branch? I dont think it will be too hard. I havent looked at
the image-dired code, but I think using the imagemagick patch greatly
simplifies the making of thumbnails. You just make the display spec
point to the original image, and set the width, or height, you want. It
will then be scaled by ImageMagick. I tried something similar in my
scanner package, emsane.el, and it worked ok. Also, have a look at the
changes in image-mode.el, which now supports a fit-to-height flag.

I was also toying with the idea of an "ls" implementation for eshell
which would make thumbnails in the eshell buffer.

> /Mathias
-- 
Joakim Verona



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-01 18:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <m3y6fmyjlh.fsf@verona.se>
     [not found] ` <87fx1gtn9p.fsf@mail.jurta.org>
2010-07-01 10:40   ` support for image count in imagemagick joakim
2010-07-01 17:32     ` Mathias Dahl
2010-07-01 18:59       ` joakim

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).