Comments (24)
Hello ruven,
Firstly, thanks for all your work on iipsrv. It's very useful for us. :-) 👍
You said here ( http://iipimage.sourceforge.net/2011/04/iipimage-0-9-9-server-release/ ) than "a fully open source implementation based on openJPEG will be included in the next server release".
Is it still your goal ?
Thanks.
from iipsrv.
Firstly, thanks for all your work on iipsrv. It's very useful for us. :-) 👍
Thanks!
a fully open source implementation based on openJPEG will be included in the next server release
I'm afraid it won't make it into this coming version 1.0, but will definitely be in version 1.1.
from iipsrv.
Ok.
Thanks for your reply. :-)
from iipsrv.
If someone can point me to the right part of the codebase to integrate these libraries, I would be happy to begin working on a branch to support this goal for the 1.1 release. I also know a number of others who would be interested in this as a technical challenge, both simply integrating the components, and in improving the components themselves (adding gpu support to openJpeg for instance) to bring them up to a superior level when compared with Kakadu.
from iipsrv.
It seems that @boskar might have some specific ideas as to where to start.
from iipsrv.
There are efforts underway by the Wellcome Library to get openJPEG up to par with Kakadu.
See:
from iipsrv.
Well, We should obviously start here: https://github.com/moravianlibrary/iipsrv-openjpeg and see how good it is at the moment. I suppose there is no other way that reading the code referencing to kakadu and finding equivalents in chosen library...
http://apps.man.poznan.pl/trac/jpeg2k/wiki does not seem to have library as is, although the encoder/decoder works (tested today). Maybe we should cooperate with the authors about integration?
cuj2k - site does not work due to SF being down.
On the other hand: there seems to be another alternative (paid):
http://www.fastcompression.com/products/jpeg2000/cuda-jpeg2000.htm -
They support jpeg as well, so if full integration is ever made - that'd fast as hell.
from iipsrv.
I haven't tested it myself, but the openjpeg branch you cite is reportedly around 1000x slower than Kakadu.
However, as pointed out by @ahankinson there's work under way to optimize openjpeg, so it may become competitive speed-wise in the not too distant future. So, if you're looking for a technical challenge, helping to add SIMD or GPU support to openjpeg could be both very interesting and very useful!
from iipsrv.
https://github.com/stweil/iipsrv/tree/openjpeg-api-fixed is based on https://github.com/moravianlibrary/iipsrv-openjpeg, but fixed for latest OpenJPEG. I could process a JP2 file with it, but also observed program crashes. https://github.com/stweil/iipsrv/tree/openjpeg is a branch which merged latest iipsrv. It still needs some API fixes.
from iipsrv.
https://github.com/stweil/iipsrv/tree/openjpeg now works with OpenJPEG. It takes a lot of time: PalaisDuLouvre.jp2 (made from PalaisDuLouvre.tif) needs 27 s on my Intel Core i7 notebook.
iipsrv calculates 63 tiles, each of them taking about 0.4 s. If it would use all CPU cores of my notebook (as Kakadu does), the total time could be reduced from 27 s to 7 s.
With Kakadu, iipsrv does not calculate any tiles at all and delivers the same PalaisDuLouvre.jp2 as a JPEG image in 0.26 s. That is about 100 times as fast as OpenJPEG (not 1000 as it was reported by others).
For PalaisDuLouvre.tif, iipsrv calculates 223 tiles in 0.125 s.
from iipsrv.
Have You tried using multiple instances of iipsrv? It could be a way to parallelize the work...
from iipsrv.
@boskar: IMHO that would parallelize the work if there are several parallel requests, but not for each individual request...
from iipsrv.
@stweil Sure, You're right. But who needs a single tile? I suppose the client does not download them in row.
from iipsrv.
@ruven, are you interested in pull requests to get the OpenJPEG support added? The new code is clearly separated from the Kakadu code and could be disabled by default, so the risk would be low.
from iipsrv.
I'm preparing things for the 1.0 release, so let's wait until that's out of the way, then I'll be happy to accept a pull request.
from iipsrv.
Would it be useful to open a pull request with the understanding that it won't be merged until after 1.0?
from iipsrv.
You could do, but any pull will probably be easier if it's based on the final 1.0 code
from iipsrv.
It's possible to keep a PR up to date with frequent merges from master, so that the accepted PR applies cleanly to the latest revisions. That depends, of course, on the maintainer of the PR staying on top of it. :)
from iipsrv.
I just provided PR #61 for anybody interested in trying OpenJPEG support. This PR will be rebased and updated as needed.
from iipsrv.
The bad performance of iipsrv with OpenJPEG is mainly caused by the missing support for regionDecoding in the current code: while Kakadu requests the region directly from the JP2 image, OpenJPEG uses the TileManager to calculate a lot of tiles (several hundreds or more for large images), so the time factor of 100 or 1000 is not surprising – the factor will increase with the image size.
from iipsrv.
Not sure what the current state of openjpeg support is with IIP master, but I am retrofitting IIP to embed ICC profiles from the source files into the JPEGs that IIP generates. However, it seems that only one region from the source image is currently being extracted. See the screenshot below. This was found using one of the Wellcome Library's JP2 images and IIP on RedHat EL6 with openjpeg2-2.1.0-7.el6.x86_64 and openjpeg2-devel-2.1.0-7.el6.x86_64 from the EPEL repository and with IIP compiled using configure --enable-openjpeg.
from iipsrv.
I think that the status is still experimental. Nevertheless the effect which you observe looks strange. Perhaps you can try to debug it, for example have a look into the server log output.
from iipsrv.
Yeah, maybe in my free time :) For now, I'm going to ensure the ICC gets embedded in the resulting image and move on.
from iipsrv.
Is this issue still open, or can it be closed?
from iipsrv.
Related Issues (20)
- Can't disable webp support HOT 1
- is it possible to change dpi? HOT 2
- [question] jpg support HOT 1
- Questions related with memcached, OpenJPEG and Kakadu HOT 7
- suggestion: do not require webservers and firefox in DEB HOT 2
- fails on file processed with vips, but works if png used as intermediary HOT 5
- Full image loading without watermark HOT 41
- CORS header not always present HOT 3
- No DPI in JPEG files generated by IIP HOT 10
- Compiling with Kakadu 8.3 HOT 5
- FastCGI HOT 1
- How to test? HOT 5
- File names with comma no longer work HOT 4
- Deepzoom with non-pyramidal tiled TIFF HOT 4
- Question: Does iipsrv support lossless WebP format? HOT 3
- Kakadu causes defunct fcgi HOT 9
- Question: How about Grok? HOT 2
- Problem accessing images in subdirectories HOT 2
- Can we scale IIPSRV horizontally? HOT 1
- Question: How to add Kakadu support in Visual Studio 2022? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iipsrv.