From: joakim@verona.se
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: Camm Maguire <camm@maguirefamily.org>, emacs-devel@gnu.org
Subject: Re: fast image paging
Date: Wed, 13 Nov 2013 19:41:23 +0100 [thread overview]
Message-ID: <m3fvr0i1po.fsf@exodia.verona.se> (raw)
In-Reply-To: <jwv38n09rpj.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 13 Nov 2013 11:49:23 -0500")
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> Greetings! I have a djvu mode which is designed for scholars reading,
>> annotating, and cross-referencing many large documents. Right now I use
>> pbm formats and create-image. This makes it easy to highlight and
>> correlate pixels with text, but the images can get quite large, making
>> handling sluggish on slower machines.
>
>> Will I improve anything here using a compressed format like png? Or,
>> when emacs displays and moves the image, does it decompress the image
>> anyway into the same sized internal data structure?
>
> I don't know the precise details, but I think that if you use PNG you
> won't gain much because indeed, the png library will begin by
> decompressing the image and keeping it that way in memory.
>
> You might have better luck if you use the `imagemagick' image type,
> which might be able to render dejavu directly (i.e. without going
> through pbm/png/...), so only the current page is kept in decompressed
> bitmap form.
FYI I made the original Imagemagick patch for Emacs specifically for
working with Djvu in Emacs. I used it for scanning lots images with this
elisp: https://github.com/jave/emsane described here
http://www.verona.se/projects/emsane.html
I used it to archive about 200K djvu pages, much of it previewed in
Emacs.
Anyway, I think the point I'm trying to make is that the Imagemagick
support works pretty well for Djvu. It's also true that there are some
deeply hidden knobs in Imagemagick that you might need to twist in order
to make it work well in your case.
> IIRC last time someone tried to use it there were some problems
> (performance, maybe?). Those problems may have been fixed since,
> I can't remember. It's definitely worth a try, I think, tho.
>
> And I'd be very happy to see your mode in GNU ELPA, so if you're
> interested in submitting it for inclusion, send me an email,
>
>
> Stefan
>
--
Joakim Verona
prev parent reply other threads:[~2013-11-13 18:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-11 20:08 fast image paging Camm Maguire
2013-11-13 16:49 ` Stefan Monnier
2013-11-13 18:41 ` joakim [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3fvr0i1po.fsf@exodia.verona.se \
--to=joakim@verona.se \
--cc=camm@maguirefamily.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.