From ac6645da52eb3f7964fafd725bfe3582d8bc6795 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Wed, 20 Mar 2024 20:24:44 +0000 Subject: [PATCH] Skeleton for JPEG2000 support --- Makefile | 4 ++-- cpdfjpeg2000.ml | 5 +++++ cpdfjpeg2000.mli | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 cpdfjpeg2000.ml create mode 100644 cpdfjpeg2000.mli diff --git a/Makefile b/Makefile index 4abb4ab..75de350 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,8 @@ DOC = cpdfunicodedata cpdferror cpdfdebug cpdfjson cpdfstrftime cpdfcoord \ cpdfembed cpdffont cpdftype cpdfaddtext cpdfpad cpdfocg \ cpdfsqueeze cpdfdraft cpdfspot cpdfpagelabels cpdfcreate cpdfannot \ cpdfxobject cpdfimpose cpdfchop cpdftweak cpdftexttopdf cpdftoc \ - cpdfjpeg cpdfpng cpdfimage cpdfdraw cpdfcomposition cpdfshape \ - cpdfcolours cpdfdrawcontrol cpdfcommand + cpdfjpeg cpdfjpeg2000 cpdfpng cpdfimage cpdfdraw cpdfcomposition \ + cpdfshape cpdfcolours cpdfdrawcontrol cpdfcommand MODS = $(NONDOC) $(DOC) diff --git a/cpdfjpeg2000.ml b/cpdfjpeg2000.ml new file mode 100644 index 0000000..bcbd084 --- /dev/null +++ b/cpdfjpeg2000.ml @@ -0,0 +1,5 @@ +open Pdfutil +open Pdfio + +(* Return the width and height of a JPEG2000 image, per Michael Petrov's C version. *) +let jpeg2000_dimensions bs = (0, 0) diff --git a/cpdfjpeg2000.mli b/cpdfjpeg2000.mli new file mode 100644 index 0000000..57d3b23 --- /dev/null +++ b/cpdfjpeg2000.mli @@ -0,0 +1,4 @@ +(** JPEG2000 Utilities *) + +(** Return the width and height of a JPEG2000 stream *) +val jpeg2000_dimensions : Pdfio.bytes -> int * int