Replies: 2 comments 8 replies
-
Hello @jrochkind, That's right -- by default dzsave will strip all colour profiles from image tiles. You can use the The problem is that profiles can be extremely large -- a CMYK JPEG profile can easily be 500kb, even a regular sRGB profile is 3kb. A 256x256 pixel JPEG is typically only 4kb, so not stripping profiles would often double the pyramid size (!!). You can convert to srgb and then save as deepzoom in one operation with:
EDIT that should be:
|
Beta Was this translation helpful? Give feedback.
-
I don't know how much dev time you have to waste on this, but a good trick is to upload the deepzoom images as uncompressed zip files. They are much easier to manage than 30,000 tiny jpegs. You can change the tile fetch function in openseadragon to fetch from the zip on s3 using http RANGE requests, so you never need to unzip the stupid things. You'll need something to parse the zip index from the end of the file.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
reproduced with vips-8.15.1
I have a large TIFF file with embedded ICC color profile, identified as "Adobe RGB".
I create an image pyramid from it with the command line:
The output files have colors shifted, the colors look wrong.
However, if I first convert the original TIFF to srgb color profile with:
And then run
dzsave
onoriginal-srgb.tiff
-- then the problem does NOT reproduce, the colors look fine.From this, my hypothesis is that something in
dzsave
is stripping the correct ICC color profile information from the resulting.jpg
files created, but without actually doing a correct colorspace transformation to srgb. So the resulting .jpgs are interpreted by viewers as if they were in an srgb colorspace, when the pixels are actually still in Adobe RGB colorspace.So as above, one easy workaround is simply converting my TIFF to srgb before running
dzsave
, but this is both confusing undocumented necessity (I've created many TB of erroneous image pyramids already, sadly!), as well as unnecessary extra cpu and disk IO if it could be done in one pass instead.I believe I used to have a problem like this with
vipsthumbnail
as well in older versions of vips, but I can't currently reproduce them. I think maybe there were similar bugs in vipsthumbnail that were fixed -- but maybe still remain in the less-used so less-noticed dzsave?I can try to provide sample images if you'd like, but it's confusing to deal with the image pyramids! If you'd like sample images, will URLs to public files on s3 suffice? I suppose you could point OpenSeadragon at the image pyramid on S3, to be somewhat less confusing than trying to compare image pyramid tiles nakedly!
Thanks for the amazing vips tool, and thanks for any thoughts.
Beta Was this translation helpful? Give feedback.
All reactions