* fast image paging
@ 2013-11-11 20:08 Camm Maguire
2013-11-13 16:49 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Camm Maguire @ 2013-11-11 20:08 UTC (permalink / raw)
To: emacs-devel
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?
Take care,
--
Camm Maguire camm@maguirefamily.org
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: fast image paging
2013-11-11 20:08 fast image paging Camm Maguire
@ 2013-11-13 16:49 ` Stefan Monnier
2013-11-13 18:41 ` joakim
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2013-11-13 16:49 UTC (permalink / raw)
To: Camm Maguire; +Cc: emacs-devel
> 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.
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: fast image paging
2013-11-13 16:49 ` Stefan Monnier
@ 2013-11-13 18:41 ` joakim
0 siblings, 0 replies; 3+ messages in thread
From: joakim @ 2013-11-13 18:41 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Camm Maguire, emacs-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-13 18:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-11 20:08 fast image paging Camm Maguire
2013-11-13 16:49 ` Stefan Monnier
2013-11-13 18:41 ` joakim
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.