Comments (14)
Jpegs it could make sense, since the transcode is almost instant, PNGs could significantly slow down reads/writes depending on the effort setting and the PNG compression too
from libjxl.
Are you talking about v4l2 ?
from libjxl.
Nope, I am talking about intercepting reads of JPEG/PNG files and recoding, and doing the same thing at write time, actually using JXL for the on-disk representation.
from libjxl.
You do not want to use fuse+libjxl ?
from libjxl.
No, I want it to take effect on existing btrfs partitions.
from libjxl.
@mo271 this is not a possible enhancement. libjxl is currently written in c++, no way this will ever make into the linux/kernel in the near future IMHO. Fuse is the only mid-term solution AFAIK.
from libjxl.
@mo271 this is not a possible enhancement. libjxl is currently written in c++, no way this will ever make into the linux/kernel in the near future IMHO. Fuse is the only mid-term solution AFAIK.
I agree
from libjxl.
perhaps not the mainline linux kernel :-)
but DKMS exists… it's just an idea.
from libjxl.
BTW, I've been working on the fuse version of this idea. I don't have enough to share yet but it seems definitely doable if I can muster the effort to write all the glue code. It also might not ever meet particular standards for production-readiness, but I'm hoping to use it for my own photo library at least.
from libjxl.
why couldn't JPEG XL be used in the Linux kernel in much the same way, for JPEG and PNG images? It's fully transparent for both.
It wouldn't be transparent for PNG since when you convert JXL to PNG, the resulting PNG might not be compressed in exactly the same way. I also don't know whether JXL can exactly represent all the metadata in a PNG file. You'll get the same pixels, but not the same bytes, which I imagine might mess with some applications.
from libjxl.
jxl can represent all png data
also, yes it can be done. jxl can intercept both reads and writes. it would need to know which PNG files it has control over, and then would lie to user applications showing a png. when a png is asked to be read.
this is only likely to screw with very esoteric software for writing png's, which is not what i care about for my use which would be on a server where i could test all the graphics processing software; file caps could also be used to say "never JXL this PNG".
from libjxl.
another possibility to lower the chance of anything going wrong is to immediately unmark the file as JXL'able if the caller seeks at any point during the write.
from libjxl.
JXL can represent all PNG pixel data, but not all PNG bitstream data. So you can make a jxl file with the exact same pixel information, but that doesn't mean you can reconstruct the exact same png file — for that, you would also need to record how the data is represented in the PNG (e.g. indexed or full-color, one IDAT chunk or several, choice of filters, matching choices in DEFLATE, etc). It can be done, but the amount of additional information would get quite large since PNG/DEFLATE does leave quite some degrees of freedom in the entropy coding (this is why something like zopflipng is so slow). The overall compression gains would suffer if you'd try to do png recompression with bitstream reconstruction.
For JPEG it is different: JXL can represent both the pixel data and the bitstream data. It is still effective because the extra bitstream reconstruction data is quite small — JPEG entropy coding doesn't have many degrees of freedom (just the huffman tables and that's it).
Having filesystem-level support for jxl is an interesting idea, but I think the better approach is to just make all applications support jxl, and then stop using the older formats :)
What linux software does not yet support jxl at this point, and would benefit from filesystem-level jxl recompression?
from libjxl.
Is it useful to keep this open. Seems like an issue that is likely to get tracking (I don't think the kernel has any image support built in, so why would they make an exception here?).
By closing some old issues we reduce the list of open issues to a more manageable set.
from libjxl.
Related Issues (20)
- djpegli fails to decode CMYK image
- Quantization table with index 0 not found HOT 8
- Applications shouldn't abort while reading jpegs HOT 1
- 请教个问题! HOT 3
- Static libjpeg
- JXL input is supported by cjpegli, but not listed in the help
- cjxl fails on "MotionPhoto" jpegs HOT 1
- 32bit Float Density Regression HOT 3
- Add Adobe APP14 tag to JPEG images with specific colorspaces (fix XYB appearance in most apps)
- djpegli should decode xyb-jpeg to rgb-png HOT 2
- Lossy cjxl with Alpha channel not using --keep_invisible=0 as default HOT 4
- cjxl lossless (`-d 0`) is not identical. HOT 5
- Losslessly converting color JPEG to grayscale JXL HOT 4
- The effort documentation is outdated
- API for region of interest decoding
- Regression in lossy nonphotographic images HOT 3
- faster_decoding=1 or faster_decoding=2 has extremely bad size with lossless images.
- cjpegli: Pass on the DPI resolution into a JFIF marker HOT 2
- Unable to transcode a CMYK jpeg to jxl HOT 1
- cjpegli ignores sRGB ICC profiles HOT 3
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 libjxl.