Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for DjVu image format #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rramphal
Copy link

This PR adds support for the DjVu image format.

According to DjVuLibre (an open-source implementation of DjVu), "DjVu is a web-centric format and software platform for distributing documents and images. DjVu can advantageously replace PDF, PS, TIFF, JPEG, and GIF for distributing scanned documents, digital documents, or high-resolution pictures. DjVu content downloads faster, displays and renders faster, looks nicer on a screen, and consume less client resources than competing formats. DjVu images display instantly and can be smoothly zoomed and panned with no lengthy re-rendering. DjVu is used by hundreds of academic, commercial, governmental, and non-commercial web sites around the world."

According to Wikipedia, the signature for DjVu files is 41 54 26 54 46 4F 52 4D ?? ?? ?? ?? 44 4A 56.

NOTE: Similar to TIFF files, DjVu images can either be single-paged or multi-paged, where the byte following the signature above is either 55 (U) for single-page or 4D (M) for multi-page images; this PR includes tests for both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant