Skip to content

Commit

Permalink
Detection of HTJ2K also added for KakaduImage.cc for logging purposes…
Browse files Browse the repository at this point in the history
… (DEBUG needs to be enabled at compile time)
  • Loading branch information
ruven committed Jan 14, 2022
1 parent 00b69c0 commit 4db9fff
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
14/01/2022:
- Detection of HTJ2K also added for KakaduImage.cc for logging purposes (DEBUG needs to be enabled at compile time)


07/01/2022:
- Added detection of HTJ2K streams to OpenJPEG.cc for logging purposes (DEBUG needs to be enabled at compile time)


14/09/2021:
- Fix to use C99 stdint types instead of deprecated libtiff types

Expand Down
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ BASE_URL: Set a base URL for use in certain protocol requests if web server rewr
has taken place and the public URL is not the same as that supplied to iipsrv.

URI_MAP: Set a mapping from a URL prefix to a supported protocol. This enables iipsrv to
be able to work without requring full CGI query strings. Map must be of the form
be able to work without requiring full CGI query strings. Map must be of the form
"prefix=>protocol" where prefix can be either empty or any string prefix and protocol must
be one of IIP,IIIF,DeepZoom, Zoomify. Used, for example, to map requests of the form
http://server/iiif/ to the IIIF protocol handler without requiring web server rewriting.
Expand Down Expand Up @@ -503,4 +503,4 @@ For example with lighttpd:
Please refer to the project site https://iipimage.sourceforge.io for further details

------------------------------------------------------------------------------------
(c) 2000-2021 Ruven Pillay <ruven@users.sourceforge.net>
(c) 2000-2022 Ruven Pillay <ruven@users.sourceforge.net>
10 changes: 9 additions & 1 deletion src/KakaduImage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Culture of the Czech Republic.
Copyright (C) 2009-2020 IIPImage.
Copyright (C) 2009-2022 IIPImage.
Author: Ruven Pillay
This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -140,6 +140,14 @@ void KakaduImage::loadImageInfo( int seq, int ang )
kdu_coords layer_size;
jpx_layer_source jpx_layer;

// Check for High Throughput JPEG2000 codestream
#ifdef DEBUG
siz_params *siz = codestream.access_siz();
int pcap_value = 0;
siz->get( Scap, 0, 0, pcap_value );
if( pcap_value & 0x00020000 ) logfile << "Kakadu :: HTJ2K codestream" << endl;
#endif

// Malformed images can throw exceptions here with older versions of Kakadu
try{
jpx_layer = jpx_input.access_layer(0);
Expand Down

0 comments on commit 4db9fff

Please sign in to comment.