Page 1 of 1

Converting indexed DJVU to image series or multipage file.

Posted: 2015-10-12T02:20:35-07:00
by freyja
Is it possible to handle with ImageMagick the kind of DJVU that is spread across multiple files? For bundled DJVUs it works pretty well.
But I have a DJVU ensemble that contains:

Code: Select all

index.djvu #possibly not needed, informs about the order of pages
p0001.djvu
...
p0004.djvu #these are 4 normal pages, all these pages require p0004.djbz
p0004.djbz #dictionary of images common for pages 0001-0004
All files are located in the same directory.

Here are the links to download the files if you want to test them:

Code: Select all

http://www.wbc.poznan.pl/Content/329280/index.djvu
http://www.wbc.poznan.pl/Content/329280/p0001.djvu
http://www.wbc.poznan.pl/Content/329280/p0002.djvu
http://www.wbc.poznan.pl/Content/329280/p0003.djvu
http://www.wbc.poznan.pl/Content/329280/p0004.djvu
http://www.wbc.poznan.pl/Content/329280/p0004.djbz
If I issue for example:

Code: Select all

convert index.djvu output.tiff
The program prints:

Code: Select all

unexpected
and hangs. If I type ENTER it creates new lines inside the program (does it wait for input?).

It is the same if I try to convert a particular page.

Can I somehow handle such DJVUs in ImageMagick? How I would expect it to work is to unpack the common images from djbz and add them in proper places on each page, then create images.

I'm trying to use ImageMagick for this, because I would like to do it in code in the end (without materialising files on disc).

Re: Converting indexed DJVU to image series or multipage file.

Posted: 2015-10-12T15:39:54-07:00
by magick
ImageMagick does not grok your DJVU ensemble. We use the djvulibre API to read DJVU pages. You are welcome to add a patch to ImageMagick/coders/djvu.c to read ensembles. We currently do not have the time to code a solution.

Re: Converting indexed DJVU to image series or multipage file.

Posted: 2015-10-13T23:04:34-07:00
by freyja
Thank you for the answer. I will try to do a patch or use djvulibre directly.