Comments (3)
There's a TIFF tag for JXL compression:
$ grep -i jxl *.h
tiff.h:#define COMPRESSION_JXL 50002 /* JPEGXL: WARNING not registered in Adobe-maintained registry */
So I suppose we'd just need to compress each tile with libjxl, rather like jp2k.
You can see the compression enum here:
https://github.com/libvips/libvips/blob/master/libvips/foreign/vips2tiff.c#L294-L299
So we'd need to add COMPRESSION_JXL
and then fill out the various switches. We'd need to add a tile saver to jxlsave.c
too. Here's the jp2k one:
https://github.com/libvips/libvips/blob/master/libvips/foreign/jp2ksave.c#L1191-L1420
So perhaps another 300 lines there. I'd guess 2 or 3 day's work, plus the same for jxlload
, so perhaps a week's effort, all told.
from libvips.
I was going to suggested this idea as I used Tiff with JPEG all the time. I just was doing some testing and still found JXL format slower than libjpeg-turbo in writing. Another limitation I am seeing, is that even if jxl claimed to be larger than jpeg, I can't write an image larger than 10kx10k pixel successfully, while in jpeg, I can write 65kx65k with no issue. The file size will be huge but I can do it. In JXL, The writing above 10k, will finish by crashing and saying jxlsave not found. It can't handle larger files.
Does anyone else notice the same?
from libvips.
Does anyone else notice the same?
It depends on which version of cjxl
jxlsave
is using. The JXL team recent changed the encoder and significantly improved memory performance. I have found that the encoder is extremely memory hungry and often crashes if your system isn't capable. I have never tried to compress a gigapixel image though.
That said, JXL has a lossless mode which is where I see myself using this feature. I have a lot TIFF containers with special metadata or layers and being able to losslessly compress in 32/16bit is something JPEG cannot do. JXL is also better for some kinds of scientific data as it can contain far more channels including non-visible and (obviously) alpha.
from libvips.
Related Issues (20)
- vips 8.15.2 failed to build with latest xcode HOT 11
- HDR AVIF to HEIC (hdr) HOT 4
- Feature request: Support SDR→HDR via RTX HDR (upmapping / inverse tone mapping)
- AVIF with bitdepth 10 or 12 crashes
- Add nclx->icc colour management to heifload HOT 24
- Segmentation fault when performing very large number of operations HOT 1
- Subsample mode not working with jpegli HOT 4
- Add target write to `rawsave` HOT 2
- Cannot link to proper libraries on Windows 11 Pro. HOT 1
- Thumbnail/Resize removes color on Alpine HOT 1
- Add support for fractional tiff values (eg. 10 or 12 bits per pixel) HOT 6
- The position of "#include <vips/vips8>" matters. HOT 2
- distance transform HOT 1
- CMYK -> SRGB conversion results in color change
- vips dzsave crashes when saving tiff to avif HOT 3
- OSError: [Errno 30] Read-only file system: '/my' HOT 1
- Error using vips-cpp statically with msvc
- 8.15.2 crashes Erlang VM on NetBSD HOT 11
- webp works in Firefox/breaks in Chrome & libvip
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 libvips.