1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
openjpip-server will likely crash in some obscure way if you provide improper JP2 file.
To produce proper JPIP compatible JP2 file, simply use:
$ image_to_j2k -i copenhague1.tif -o copenhague1.jp2 -p RPCL -c [64,64] -t 640,480 -jpip -TP R
Note:
-jpip Embed index table box into the output JP2 file (compulsory for JPIP)
-TP R Partition a tile into tile parts of different resolution levels (compulsory for JPT-stream)
Warning: -jpip option is really important it adds the cidx/fidx superbox to the
file. Without this information, openjpip server will simply crash on your input
file. Make sure all file accessible from within openjpip server have cidx/fidx
superbox. At the time of writing, kakadu does not support generating cidx/fidx
superbox
See also Annex I Indexing JPEG 2000 files for JPIP, p90:
http://www.jpeg.org/public/fcd15444-9v2.pdf
(Optional) Embed metadata into JP2 file
$ addXMLinJP2 copenhague1.jp2 copenhague1.xml
Input metadata file "copenhague1.xml" looks like:
<xmlbox>
<roi name="island" x="1890" y="1950" w="770" h="310"/>
<roi name="ship" x="750" y="330" w="100" h="60"/>
<roi name="airport" x="650" y="1800" w="650" h="800"/>
<roi name="harbor" x="4200" y="1650" w="130" h="130"/>
<irt refimg="name1.jp2" m1="0.50" m2="-0.50" m3="0" m4="0.80" m5="-0.80" m6="0" m7="500" m8="1000" m9="0"/>
</xmlbox>
-- Mathieu Malaterre <malat@debian.org> Fri, 20 Apr 2012 11:45:07 +0200
|