Skip to content
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

Watermark not apply in SIPI docker version #447

Open
theVannu opened this issue Jun 24, 2024 · 2 comments
Open

Watermark not apply in SIPI docker version #447

theVannu opened this issue Jun 24, 2024 · 2 comments

Comments

@theVannu
Copy link

Hello there!
I am using latest docker version of SIPI and I want add a watermark to my images but have following error:

Sipi: ERROR IN TIFF! Module: TIFFOpen
2024-06-24T13:36:44.597759186Z Sipi: watermark.tif: No such file or directory
2024-06-24T13:36:44.597851083Z terminate called after throwing an instance of 'Sipi::SipiImageError'
2024-06-24T13:36:44.597868936Z   what():  std::exception

I've created an image with suffix "_watermarked" into images folder so sipi.init.lua execute following piece of code:

elseif string.find(identifier, "watermarked") then
        local filepath = config.imgroot .. '/' .. identifier
        local settings_for_sipi = {}
        settings_for_sipi['type'] = "restrict"
        settings_for_sipi['watermark'] = config.imgroot .. '/' .. "watermark.tif"
        return settings_for_sipi, filepath

Error message seems to be clear: "watermark.tif file not present into images folder" but that's wrong, I have open a shell using docker exec and check file presence.
I check that config.imgroot is equal to "./images" too.

What I am doing wrong?
Thank you all for help

@seakayone
Copy link
Contributor

seakayone commented Jul 1, 2024

I have had success in the past by putting a watermark.tif into the folder /sipi/scripts/watermark.tif which is the location your lua scripts are exectued in.

Using a docker container you probably have to mount it to this place.

@theVannu
Copy link
Author

theVannu commented Jul 1, 2024

Thank for your help.
I have put watermark.tif into scripts folder and mount it but have same error.
I also try to put it into config folder withouth success.

Another strange thing, if I change watermark file name, for example:

settings_for_sipi['watermark'] = config.imgroot .. '/' .. "my_cool_watermark.tif"

error is still watermark.tif instead my_cool_watermark.tif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants