emacs-devel
[Top][All Lists]
Advanced

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

Re: fast image paging


From: joakim
Subject: Re: fast image paging
Date: Wed, 13 Nov 2013 19:41:23 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <address@hidden> 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



reply via email to

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