-
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
Full image loading without watermark #255
Comments
This works correctly with TIFF images, but not JPEG2000. For JPEG2000, there is currently a bug that prevents watermarking on non-tile regions. There's a fix here you could try: #219 PS: I guess this almost identical question on sourceforge is from you also: https://sourceforge.net/p/iipimage/discussion/299494/thread/bc753733e0/?limit=25#9b72/1291 |
Hi @ruven ! Much appreciated your help. |
Didn't you say that it was the full that doesn't work? Essentially what happens is that when you request a "tile", the image goes through a pipeline where the image is decoded by the codec and immediately watermarked. For a "region", if the image is a TIFF, each tile is fetched individually and watermarked before being assembled into a mosaic. However, for JPEG2000, this mocaicking is handled directly by the codec itself and so is carried out outside of the watermarking pipeline. |
@ruven Yes full doesn't work with watermarks. In production env, I can see something like this: |
Yes, it's behaving as expected. |
hi @ruven . thanks a lot for quick response and for the help. reinjecting myself to the discussion. to sum up, our main issue as described above, is that on production the watermark works with full/full params correctly, i.e. you can see the full image with watermarks on it. However on the local and staging env it does not work. So does this mean that in the production the solution with jpg2000 was done using kakadu SDK?. As I understand correctly, the solution was done using kakadu sdk. since you are telling that currently there is an issue with jpg 2000. so in case of the full image the issue was handled directly by the codec itself i.e. carried out outside of the watermarking pipeline? Please let me know if I missed smth. Thanks again |
@rafayel7233 and @avnoorlogic your messages are rather contradictory. Can you please clarify? @avnoorlogic is saying that full images do not work and that tiles do. But @rafayel7233 you are now saying that full does work, but only on the production machine. Full images will never work with JPEG2000, unless the image is small enough to be considered a tile (ie. smaller than the tile size of 256 pixels). Anything larger will not be watermarked. |
@ruven sorry for confusion, let me clarify. Production. in the production env. we have images with the following params. /768,1536,256,256/256,/0/default.jpg. this opens a small part of the whole image, with watermark on it. as you also confirmed, the size is smaller then 256 pixels. On the other hand, we have also /full/full params, which opens the full image, the resolution of which seems to be the original image, at least it is greater than 256 pixels a couple of times. However in the production env we can see the watermark on it either. I am not sure how it is done, but we can see the full image with watermarks on it. Staging/Local We noticed one thing though, it seems that in case of full/full jpg format, when we download the image, it seems not to be the same quality then the original image when we compare (we have the original image) - the size is small and resolution is different. might it be the case that when opening via full/full it is not showing the original image, or smth constructed vial tiles? or might it be smth else? Thanks in advance. Rafael |
The output images are transcoded to the output format you ask for (JPEG in this case). Remember that your source image is a JPEG2000 image, so transcoding needs to happen. You can, however, modify the JPEG quality factor for the output image. It's set to 75 by default, but you can use the JPEG_QUALITY startup variable to set it higher if you want better quality. As for the difference between your environments, it indeed seems strange that this should happen. I presume your iipsrv startup variables are identical? What about the WATERMARK_PROBABILITY parameter. If this is not set to 1, then watermarks will be applied randomly. Could this explain the differences? |
@ruven On local env WATERMARK_PROBABILITY=1.0 and JPEG_QUALITY=50. On live env WATERMARK_PROBABILITY=1.0 and JPEG_QUALITY=90. |
I was indeed referring to variables like JPEG_QUALITY, WATERMARK_PROBABILITY, VERBOSITY and LOGFILE etc that you supply to iipsrv. If WATERMARK_PROBABILITY is set to 1.0 on both your production and staging servers, the output should be identical. Can you give me an example IIIF URL where you see the watermark in the production server but not the staging one? Give me also the exact image size of the JPEG2000 being requested. What about Memcached? Are you using a shared cache? |
@ruven I wont be able to share staging and production environment image urls. Can share some part of my configuration file if it makes sence. |
Not the whole URL, just the IIIF part after the image name |
@ruven Here is the url |
And what is the size in pixels of this JPEG2000 image? |
@ruven 1480 X 1000 |
OK, and can you copy and paste what it prints in the iipsrv log on the staging server when you make this request (so not all the log, just the lines relevant to this request)? |
@ruven yes |
@ruven also after a while I am getting this log message. |
For your first log extract, this is just sending a HTTP 304 with your browser using its cached version. Try doing a shift reload to get it to fully extract the image. For the terminated signal shutdown. Is this happening by itself or are you triggering a shutdown? You also seem to have multiple instances of iipsrv running. Switch to just 1 for debugging purposes. |
@ruven Full Request is iiif=na/na/0042/00001300/NA.0042.00001308.jp2/full/full/0/default.jpg |
Shut down is happening by itself |
OK, so can you now increase the verbosity on your production machine and do the exact same request? And how are you starting the iipsrv instance? Through Apache? On the command line? |
@ruven I have docker container with apache and iipsrv. services I am starting by container run. |
@ruven for prodaction logs I need a high level permission, so today won't be. `
` |
Yes, this line indicates that watermarking is occurring for some of your requests:
However, for the other request Watch out: as you are starting multiple iipsrv instances, the various instances are printing their logs to the same file making it difficult to trace properly. |
@ruven thanks for your answer |
You said you're using Apache, so to start just 1 instance, set |
@ruven Oh, In my case it is set 80
|
80 is rather high! Unless you have an 80-core CPU of course ;-) |
Hi @ruven . Hope you are going well. I am trying to install Kakadu with IIpsrvc but getting errors
How can I fix this? |
You need to let iipsrv know where your Kakadu source files are at the initial
You should see Kakadu listed as enabled at the end. |
@ruven I am running this command on my docker container
|
And kakadu I am downloading form this source http://kakadusoftware.com/wp-content/uploads/KDU805_Demo_Apps_for_Linux-x86-64_200602.zip |
Your link is just for binary executables - you need the Kakadu SDK. Kakadu's software is proprietary and you will need to contact Kakadu to purchase a license for the SDK. |
Got it. Thank you! |
@ruven If I set up Kakadu instead of OpenJPG, Will it solve the issue related to full image watermarking or the issue related to only JPEG2000 format? |
No, the issue is related to JPEG2000 in general |
Can you suggest any solution that can solve this issue? Because missing watermarks on full images are a policy issue. |
If you want an immediate solution, there are 2 options:
|
@ruven thanks a lot for the solution. I have tried 2nd option and it worked. |
Hello everyone.
I set up IIP server on docker environment on apache server. Configured iipserver to show watermarks on images. But if I make request with http://my-domain/iiif/image-path/full/!1200,1500/0/default.jpg or http://my-domain/iiif/image-path/full/full/0/default.jpg parameters it load image without watermark. With this http://my-domain/iiif/image-path/8192,4096,1708,2344/107,/0/default.jpg parameter it will load proper way, with watermarks. If in parameters list is full parameter it will load image without watermarks. So my question is how to properly config iipserver to load images with watermark in those cases as well?
Thank you!
The text was updated successfully, but these errors were encountered: