-
-
Notifications
You must be signed in to change notification settings - Fork 656
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
Tiff to JPEG with libvips 8.8.0 for some images #1329
Comments
Hello @rps01, That's interesting. Could you send a sample file that fails? You can mail me privately if that's easier. |
@jcupitt Won't be possible to share copyright asset. Tiff assets for which there is issue, they have metadata of about 67kb/70kb. We plan to use [strip] option for now. Do you see any issue if we use [strip] with assets which doesn't even have XMPmetadata. [strip] option is something i found from the past issue , is there any documentation where such options are mentioned. Thanks. |
I think XMP over 64kb is difficult for libjpeg, so this is not supported. The jpeg save docs are here: https://jcupitt.github.io/libvips/API/current/VipsForeignSave.html#vips-jpegsave
It will remove ICC profiles as well, so you should convert to sRGB if these are for display. This page has some notes: https://libvips.github.io/libvips/API/current/Using-vipsthumbnail.md.html |
Have the same issue, also when converting to png. It's somehow random and hardly reproducible but have it in my logs from time to time (from the PHP extension).
And here's the triggering image: |
Thanks for the example @chregu. I think it is working, eg.:
You see the extra warnings from TIFFSetField because of the error on I'll see if I can see what's causing the |
Ah yes, it works for |
Still hard to reproduce, it happens only every few requests. But figured, that the error may come from somewhere else, from an "out of order read" error. The whole message actually in the exception actually is.
|
Huh interesting. It's a plane-separated image (R, G and B are stored in separate subimages), perhaps that's a clue? The I thought this was harmless, but it seems it makes libtiff fret. I'll add a test. |
We were setting TIFFTAG_JPEGCOLORMODE == JPEGCOLORMODE_RGB for *all* images, but libtiff warns if you use it on an image which is not jpg-compressed. Only set it for jpg-compressed images. See #1329
I fixed the spurious Otherwise, I can't get it to fail here :( I've set this going:
I'll leave it running while I work today and see if it falls over. |
Thanks. for that. I also can reproduce with a php-fpm server and hitting reload lots of time. But not with a simple bash script :( |
Yes, mine hit 10000 iterations and had no problems :( |
Someone found a sample file that triggers the "bogus marker length" error: It may be fixed in 8.8 HEAD and the fix should be in 8.8.2. Would you be able to test this? |
I think this may be fixed in 8.8.2 and later. Please open a new issue if this comes up again. |
With libvips 8.8.0 , some of tiff assets aren't successfully converting to jpeg
command: vipsthumbnail Asset.tif -s 1280x1280 -o new.jpeg
Logs:
This issue wasn't there with previous version 8.7.4.
Related older issue: #311
Using below it does works:
command: vipsthumbnail Asset.tif -s 1280x1280 -o new.jpeg[strip]
The text was updated successfully, but these errors were encountered: