-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Add JPEG 2000 support with OpenJPEG #74
Conversation
These files from git@github.com:moravianlibrary/iipsrv-openjpeg.git are needed to support JPEG 2000 using libopenjpeg instead of Kakadu. Information from the original commit: commit 9262068b8606c2a0699ee74fad4ec991d34c7715 Author: Daniel Secik <dsecik@gmail.com> Date: Tue Jun 9 18:04:46 2015 +0200 Initial commit Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Remove whitespace at line endings * Remove empty line at end of file Signed-off-by: Stefan Weil <sw@weilnetz.de>
See this discussion: moravianlibrary/iipsrv-openjpeg#1 Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Update OpenJPEGImage::openImage for latest iipsrv. Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Add check for OpenJPEG JPEG2000 library (code mainly from moravianlibrary/iipsrv-openjpeg). * Use Kakadu by default (if available). OpenJPEG can be enforced by setting the environment variable USE_OPENJPEG=1. Signed-off-by: Stefan Weil <sw@weilnetz.de>
gcc reports these warnings: src/OpenJPEGImage.cc:174:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(; tmp_w > tile_width || tmp_h > tile_height; ++i){ ^ src/OpenJPEGImage.cc:174:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(; tmp_w > tile_width || tmp_h > tile_height; ++i){ ^ As raster_width, raster_height, tile_width and tile_height all are unsigned values, tmp_w and tmp_h should also be unsigned. Signed-off-by: Stefan Weil <sw@weilnetz.de>
gcc reports these warnings: src/OpenJPEGImage.cc:241:7: warning: variable ‘edge_x’ set but not used [-Wunused-but-set-variable] bool edge_x = false; // Alter the tile size if it's in the last column ^ src/OpenJPEGImage.cc:247:7: warning: variable ‘edge_y’ set but not used [-Wunused-but-set-variable] bool edge_y = false; // Alter the tile size if it's in the bottom row Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
It now uses std::invalid_argument and a new derived file_error exception See also commit e79cf0e.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
The global variable logfile is already declared in the .h file. Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
👍 |
@ruven do you think this PR is ready for merging, or is there more work that needs to be done? |
It's good, but I see that there's still the unnecessary useOpenJPEG boolean. Remove this and I'll do the merge. |
Now it is no longer possible to build a binary which supports both JPEG 2000 libraries. The JPEG 2000 library must be chosen when running configure. There is a preference for the Kakadu library. OpenJPEG can be enabled with the configure option --enable-openjpeg. Signed-off-by: Stefan Weil <sw@weilnetz.de>
Done. All code and comments related to |
@ruven how does the PR look to you now? Also, once this gets merged, what is the best way of notifying users about the new feature ? IIIF Discuss google group ? |
OK merged! Thanks for all your efforts with this! |
This PR is similar to PR #61, but based on latest git master and with three new commits on top.