JPEG XL

Info

rules 57
github 35276
reddit 647

JPEG XL

tools 4225
website 1655
adoption 20712
image-compression-forum 0

General chat

welcome 3810
introduce-yourself 291
color 1414
photography 3435
other-codecs 23765
on-topic 24923
off-topic 22701

Voice Channels

General 2147

Archived

bot-spam 4380

on-topic

Whatever else

yurume
2021-07-18 09:35:09
I generally agree that PNG reconstruction should be an optional feature at best, only added upon request due to ii)
2021-07-18 09:35:35
preflate does a great job but for non-zlib streams it seems to incur a few percents of overhead
fab
yurume I generally agree that PNG reconstruction should be an optional feature at best, only added upon request due to ii)
2021-07-18 09:35:39
and the png that you can optimize the best how it weights
2021-07-18 09:35:48
versus the original png reconstructed
2021-07-18 09:35:59
tell me file size with same file
yurume
2021-07-18 09:36:38
that's an interesting take, let me check with pngcrush
fab
2021-07-18 09:41:18
do you are on windows
yurume
2021-07-18 09:41:47
yes, though I have an access to linux (I has several boxes as well)
fab
2021-07-18 09:42:02
https://css-ig.net/pinga
yurume
2021-07-18 09:42:16
and the 30MB image in question didn't recompress with pngcrush (no `--brute`)
fab
2021-07-18 09:42:19
can this reduce more than 1,6 mb a 4000x3000
veluca
2021-07-18 09:42:33
so the biggest problem I see with this is that preflate *de*compression seems to be incredibly slow
yurume
2021-07-18 09:42:33
I'll try that
fab
2021-07-18 09:42:42
with the slowest it has there
2021-07-18 09:43:02
this is from a french developer
yurume
veluca so the biggest problem I see with this is that preflate *de*compression seems to be incredibly slow
2021-07-18 09:43:02
totally agreed, decompression was generally slower than compression
fab
2021-07-18 09:43:14
use only that image mai minase said
2021-07-18 09:43:31
and slowest lossless drag and drop
2021-07-18 09:43:51
and at the end check file size in bytes and copy there
2021-07-18 09:44:11
is very fast
2021-07-18 09:44:33
i'm trying also
yurume
2021-07-18 09:45:54
30546.22 -> 20856.60 in about 1 minute (haven't accurately timed)
fab
2021-07-18 09:46:37
so it did
2021-07-18 09:46:43
with slowest pingo/Pinga
2021-07-18 09:47:36
jxl is 19,2 mb with included reconstruction data or only the bitstream
yurume
fab with slowest pingo/Pinga
2021-07-18 09:49:10
it seems that when I turn the lossy transform off (in settings) it only results in 29112.56 KB in 40s
2021-07-18 09:49:53
so it clearly does some lossy (but visually imperceptible) transformation by default, which is not a fair comparison
veluca
2021-07-18 09:50:15
any reason for just trying `-s 3`? πŸ˜›
fab
yurume so it clearly does some lossy (but visually imperceptible) transformation by default, which is not a fair comparison
2021-07-18 09:50:21
it does png 16 bit vs 8 bit
2021-07-18 09:50:26
so it deletes blue information
2021-07-18 09:50:28
don't know
2021-07-18 09:50:31
i could try
yurume
2021-07-18 09:50:44
I think the file is in 8-bit RGB?
veluca
2021-07-18 09:50:47
I can run a `-s 9` or something if I can get my hands on the PNG
fab
2021-07-18 09:50:56
https://discord.com/channels/794206087879852103/806898911091753051/866255686940491796
2021-07-18 09:51:05
it doesn't compress good, worse than before
yurume
2021-07-18 09:52:23
(pinga by the way seems to have a good interface, thank you for the pointer)
veluca
2021-07-18 09:56:07
that was way more complicated than I thought it would be xD
2021-07-18 09:57:13
well, it started compressing, so there's that - will take a while...
2021-07-18 09:57:23
at some point I need to make a "webp mode" en/decoder
2021-07-18 10:43:47
I'm out :P I'll let you know when I'm back
Jyrki Alakuijala
2021-07-18 10:48:05
Lode did something like that with https://github.com/google/grittibanzli for deflate streams
2021-07-18 10:56:33
thank's for the clarification -- I haven't been following preflate
2021-07-18 10:57:26
I'm perfectly happy in either one winning πŸ˜„
2021-07-18 10:59:20
I think it took 2-3 weeks from Lode to develop grittibanzli -- this technology is not amazingly difficult and we could afford to have a rethink and a new architecture there if we wanted to build something
2021-07-18 11:00:13
I consider that all dense approaches need to do something similar to compression at decompression time, so none of it is going to be fast to decompress
2021-07-18 11:01:46
usually one would have layering where there is an efficient algorithm actually compressing the data, and another representation on how to rebuild it into deflate (and png)
2021-07-18 11:02:39
it might be possible to get faster-to-decompress solution by breaking the layering, but then it becomes a 100x more difficult problem -- it would include the problem of building a real new compression format and engine
2021-07-18 11:04:10
likely the result still being slightly worse in compression to current approaches (but decompression possibly 3x faster)
diskorduser
2021-07-18 11:10:09
Dense compression might be useful for compressing DNGs. Decoding time doesn't matter for such files.
veluca
veluca I'm out :P I'll let you know when I'm back
2021-07-18 12:40:22
Compressed to 16734613 bytes (3.167 bpp).
2021-07-18 12:46:22
can somebody measure how fast decompression with preflate is? say in MP/s
yurume
2021-07-18 12:47:42
in my latest log with the aforementioned 30MB image, 0.76 MP/s 😦
veluca
2021-07-18 12:49:52
right, that's pretty slow
2021-07-18 12:51:28
I think the slowest single-core pixel decoding in modular is still 3x that or so
2021-07-18 12:51:41
6x likely on reasonable settings
Jyrki Alakuijala
2021-07-19 11:51:47
practical image decompression speeds are around 20 megapixels/second and upwards
2021-07-19 11:52:16
that's about 60-160 megabytes per second
2021-07-19 11:53:13
if the speeds get to 100 megapixels/second range it may give additional system complexity reductions (such as less need for caching the next image, etc.) for viewers
2021-07-19 11:53:36
I don't know, I believe it is in the 5-10 megapixels/second currently
2021-07-19 11:54:09
there is a secret plan to make the decoding speed more similar to webp lossless
2021-07-19 11:54:35
hasn't been prioritized yet, so somewhat unlikely to happen in 2021
2021-07-19 11:55:56
perhaps something like 5 % more density than webp lossless, but 30 % slower
2021-07-19 11:56:56
matching speed exactly would mean to build a specialized 8 bit decoding pipeline -- I think we'd rather keep things working with 16 bits per channel by default implementation and optimize that
2021-07-19 11:57:37
this hasn't been discusses in detail in our team and is just wild guesses based on my experience with WebP lossless and JPEG XL lossless
2021-07-19 11:58:08
one of the main differences is the context tree vs. context LUTs
2021-07-19 11:58:30
it is possible to formulate the context trees in a way that they are representable by a LUT
2021-07-19 11:58:39
that approach will solve the main problem
2021-07-19 11:58:54
the entropy coding is very similar in both (context clustering)
2021-07-19 11:59:38
I developed it first for WebP lossless, reused it in Brotli, from there to Brunsli, from there to Pik, and it found its way to JPEG XL
2021-07-19 12:00:06
the performance characteristics are very similar for that
2021-07-19 12:00:54
in WebP lossless we cannot have pixel based contexts, i.e., previous pixel doesn't affect the context of the next pixel -- only its x,y position, and the context is just explicitly written out in a subresolution image
2021-07-19 12:01:26
it is more like defining blocks of entropy coding, just in 2d and having the ability to reuse entropy codes
2021-07-19 12:02:01
in JPEG XL you can do that by building a very complex decision tree -- possibly at better resolutions it becomes excessively expensive to code
2021-07-19 12:02:20
but currently we are not using fine resolutions for that in webp lossless either
2021-07-19 12:03:14
(going down to 4x4 resolutions in that would improve webp density but that wouldn't work with the context tree -- then again, being able to have some of the context based on the previous pixels improves things a lot)
2021-07-19 12:04:37
the predictors are similar -- jpeg xl predictors use a 5x5 neighbourhood, webp only 3x3 neighbourhood, so there webp is going to be worse in density but slightly faster
lithium
2021-07-19 01:16:21
I noticed some simple structure png image, if I do some png palette optimize before jxl lossless, jxl can compress better.
2021-07-19 01:28:43
but I still like use jxl lossy mode, except some not suitable DCT image, vardct d1.0, 0.8, 0.5(near-lossless) should very useful for every scenes, hope we can get another quality improve implement in this month. πŸ™‚
2021-07-19 01:34:23
(I noticed png pal8-Indexed grayscale sample have some strange situation.) > - 675,839 > 1.0_s7 389,969 > 1.0_s8 916,688
diskorduser
lithium but I still like use jxl lossy mode, except some not suitable DCT image, vardct d1.0, 0.8, 0.5(near-lossless) should very useful for every scenes, hope we can get another quality improve implement in this month. πŸ™‚
2021-07-19 03:34:13
So 0.5 d good enough for animu?
Jyrki Alakuijala
2021-07-19 03:55:04
Lee, could you post here a VarDCT example that demonstrates a weakness -- at lowest possible d-value?
2021-07-19 03:55:15
like d0.5 or d0.8
2021-07-19 04:16:03
also if you have any anecdotal observations on when it happens most or is most visible -- I'd love to learn about it
lithium
2021-07-19 04:27:53
Thank you for your reply, <@!532010383041363969> πŸ™‚ I'm nitpicking a little bit out there, but I still hope d0.5 quality can near webp near-lossless 60, d1.0 quality can near webp near-lossless 40, https://discord.com/channels/794206087879852103/803645746661425173/865301723015020544 For this issue sample, I can see some tiny ringing spread on red area, (for older jxl blue area also can see same issue, but newer jxl blue area is better for now), I guess red, blue, purple area and gradient area probably have chance happen this issue. ​ And I guess high contrast sharp edges probably implement strong reduce ringing features, can let quality better. For now d1.0 probably too risk for some complex structure anime image(color), For manga and comic image(black and white, sharp edges) d1.0 is good, (implement strong reduce ringing features, can let d1.0 quality better)
diskorduser So 0.5 d good enough for animu?
2021-07-19 04:30:20
For now I think d0.5 is good enough, but some edge case probably give you some unexpected quality.
diskorduser
2021-07-19 04:47:36
I tried to convert a svg to jxl. 0.5d vardct is bigger than lossless modular.
lithium
2021-07-19 05:03:51
I think svg image not suitable lossy vardct mode, lossless modular is better.
diskorduser
2021-07-19 05:08:07
They have lot of sharp edges. So I thought it would be better to use them for testing high contrast, sharper edges.
lithium
2021-07-19 05:10:12
Probably comic or manga content is more suitable for vardct mode.
_wb_
2021-07-19 06:55:34
Someone should write an svg to jxl encoder that encodes shapes that can be represented as splines directly as splines and only leaves what cannot be done with splines for modular.
veluca
2021-07-19 07:52:39
#easy
diskorduser
2021-07-19 07:53:16
Yes yes yes !!!!!
_wb_
2021-07-19 09:16:24
#notreallybutwouldbecool
improver
2021-07-19 10:03:53
is there something what one cannot represent with splines?
2021-07-19 10:04:19
vector stuff wise
2021-07-19 10:05:27
i should look into what params they actually are capable of having
2021-07-19 10:06:50
but i imagine one can just draw fat lines for filling stuff, and use straight lines for a lot of primitive shapes
2021-07-19 10:07:15
except maybe text which would work better with patches ig
spider-mario
2021-07-19 10:28:38
of note is that splines are additive, they cannot occlude stuff
2021-07-19 10:29:23
in their initial design, they could (there were two options: additive, or alpha blending), but we decided to scrape it
veluca
2021-07-19 10:39:20
can still do spline frames and then use patches I guess
_wb_
2021-07-20 06:18:30
They can occlude/overlap if they're black, it will just get clamped after decode
improver
2021-07-20 10:46:45
why they ended up non-occlusive? curious about tradeoffs what led to that
spider-mario
2021-07-20 10:50:41
I don’t remember the details but I think it was a combination of speed and complexity
2021-07-20 10:51:18
(the removal was two years ago already)
_wb_
2021-07-20 11:12:48
As long as the lines don't cross/overlap, it should be ok. In most svgs they would cross/overlap though, I suppose
2021-07-21 06:56:18
https://www.reddit.com/r/compression/comments/ooh8cs/random_data_and_lossless_compression/
2021-07-21 06:56:34
Again one of those...
lithium
2021-07-21 09:00:13
compress dream topic πŸ˜›
Scope
2021-07-21 07:19:36
https://twitter.com/bummzack/status/1417900398858416128
2021-07-21 07:20:42
2021-07-21 07:21:04
yurume
2021-07-22 01:45:16
wait, what??
2021-07-22 01:46:16
oh, so Bing does immediately index gists...
2021-07-22 01:46:39
never thought about that possibility though
lithium
2021-07-22 04:26:08
I want convert some bmp, webp to png(pixel) and compress to jxl, Could anyone can teach me which cli tool suitable for this job(windows)? ImageMagick-convert have some strange behavior... > 1. (original)=> png Chunks: iCCP > 2. (pingo webp)=> webp keep iCCP > 3. (ImageMagick-convert)=> png Chunks: bKGD, cHRM, iCCP, tEXt(3), zTXt
spider-mario
2021-07-22 04:42:05
you could maybe use `convert` to convert to PPM, and pass that to JXL?
2021-07-22 04:42:27
maybe with `-x icc_pathname=….icc` if the profile is not sRGB
2021-07-22 04:43:00
it completely sidesteps the issue of metadata coming from ImageMagick
lithium
2021-07-22 04:43:57
ok, I will try it, thank you very much πŸ™‚
spider-mario
2021-07-22 08:08:09
color management is vital, it’s how we ensure that `(255, 0, 0)` is the right shade of red
2021-07-22 08:08:13
without it, all bets are off
Jyrki Alakuijala
2021-07-23 10:17:14
Lee, right now I'm exploring changing adaptive quantization to have some more bits for higher chromacity values -- and I have promising initial results at least in butteraugli scores
2021-07-23 10:17:49
Currently I'm having success with adding some more bits when B > 1.4 * Y, and for high X values in general
2021-07-23 10:18:26
optimization is still running, but likely I'll send a PR today or in a few days
2021-07-23 10:29:39
it is like 2.5 % reduction of maximum butteraugli error, and ~0.02 % on bpp * pnorm
2021-07-23 10:31:03
it will improve quality in highly saturated blue and red parts -- naturally at the cost of quality elsewhere
lithium
2021-07-23 10:40:26
Thank you for your work πŸ™‚
Jyrki Alakuijala
2021-07-23 10:54:51
No, Thank You for the guidance πŸ˜„
BlueSwordM
Jyrki Alakuijala it will improve quality in highly saturated blue and red parts -- naturally at the cost of quality elsewhere
2021-07-23 02:48:10
It does mean that green will suffer, yes?
2021-07-23 02:48:28
We are indeed more sensitive from green compared to any other color.
Jyrki Alakuijala
2021-07-23 03:45:05
it is a 3 % improvement and a 0.1 % loss -- i.e., better balance
2021-07-23 03:47:29
all colors become the same when you zoom in enough
2021-07-23 03:47:44
or at least more similar
diskorduser
2021-07-23 04:09:25
Looks good at 100-200% ?
2021-07-23 04:09:35
Zoom
Jyrki Alakuijala
2021-07-23 06:20:22
Zooming more than 500 % is forbidden, doesn't exist
2021-07-23 06:20:57
and zooming more than 200-300 % is dubious πŸ™‚
2021-07-23 06:21:34
more seriously, I believe that people do zoom when they care about the image quality the most
2021-07-23 06:22:18
when their grandchild sends for example a group photo where they appear small, etc.
paperboyo
Jyrki Alakuijala and zooming more than 200-300 % is dubious πŸ™‚
2021-07-23 06:24:49
> zooming more than 200-300 % is dubious That’s an indirect argument for lowering quality on a HiDPI display πŸ˜‰
Jyrki Alakuijala
2021-07-23 06:25:14
yes I strongly believe that 8k monitors deserve less information per physical pixel
2021-07-23 06:25:31
it can be delivered by lower quality and/or upsampling
2021-07-23 06:25:44
where the best compromises are is still an unknown
2021-07-23 06:26:54
my laptop has a 239 ppi, 400 nit display
2021-07-23 06:27:40
I suspect that a large 8k monitor has roughly the same ppi
2021-07-23 06:28:06
it would be delightful to have all images at d1 at this resolution
paperboyo
2021-07-23 06:28:12
I’m a simple folk and my brain switches off when it sees a graph, but there may be not much (nothing?) to gain over certain density: https://observablehq.com/@eeeps/visual-acuity-and-device-pixel-ratio#cell-220
Jyrki Alakuijala I suspect that a large 8k monitor has roughly the same ppi
2021-07-23 06:31:41
> my laptop (…) my monitor I guess, without considering using loupe (and forgetting proper UI-aided zooming in for web lightboxes in galleries etc.), there is some argument to be made about phones being different to watches, to laptops, to monitors, to tvs and to home and cinema projectors (viewing distance).
Jyrki Alakuijala
2021-07-23 07:17:58
currently phones have more pixels-per-degree than computers I believe
2021-07-23 07:18:17
but I believe it is quickly going where it is just 'enough' everywhere
lithium
2021-07-23 07:19:40
I collect some grayscale comic sample from web, original file is jpg grayscale q90 444 4441x6213, but I convert to png grayscale can reduce all file size, > Image: 4441x6213 pixels | 8 bits/sample | Grayscale | 256 color(s) > jpg grayscale 228MB => png grayscale 145MB I try to using cjxl -d 1.0 -s 7 compress png grayscale comic file, but look like -d 1.0 ~ 1.6 on those distance will increase file size, How to correct lossy compress grayscale image file? could anyone can teach me about this? Also I find another grayscale comic sample, and have some strange behavior. > comic 20-gray 659KB > Input file: 20-gray.png | 675839 bytes > Image: 1115x1600 pixels | 8 bits/sample | Indexed grayscale | 256 color(s) jxl m lossless s9 531KB > -m -q 100 -s 9 -g 2 -E 3 -I 1 jxl vardct s7 390KB > -d 1.0 -s 7 jxl vardct s8 900KB(Issue) > -d 1.0 -s 8
yurume
2021-07-23 07:20:37
indeed, sometimes increasing `-s` results in a larger file
Jyrki Alakuijala
2021-07-23 07:21:43
-d 1.0 -s 7 vs. -d 1.0 -s 8 being a 390 kB vs. 900 kB difference is a bug
improver
2021-07-23 07:22:04
what goes wrong there
2021-07-23 07:22:22
does it make resulting image much more quality
Jyrki Alakuijala
2021-07-23 07:22:43
do we know what is the target intensity
2021-07-23 07:22:58
or how the colorspace was defined
2021-07-23 07:23:15
could be something exotic in an ICC profile (if any)
2021-07-23 07:23:36
I'd like us to investigate in any case -- please file an issue
_wb_
2021-07-23 07:26:53
Grayscale itself can also be the issue, there can be a bug in a codepath specifically for grayscale
2021-07-23 07:28:40
Grayscale comics might behave quite non-photographically, so lossless or semi-lossless could work a lot better than DCT, depending on the image contents
2021-07-23 07:29:01
Especially if it's not a scan but a digital original
Jyrki Alakuijala
2021-07-23 07:37:34
yes, an improvement possibility
2021-07-23 07:38:08
vardct should be like an unsurprising work horse -- you get the work done without 2x file size surprise
2021-07-23 07:38:20
perhaps 10% might be acceptable
lithium
2021-07-23 07:39:05
maybe grayscale image can use lossy palette?
Jyrki Alakuijala
2021-07-23 07:39:19
vardct doesn't have palettes
_wb_
2021-07-23 07:39:20
Nah, that's better for color
2021-07-23 07:39:49
Vardct has patches though, it should do more with them when it makes sense
2021-07-23 07:40:16
Patches can use palette or whatever
Jyrki Alakuijala
2021-07-23 07:40:22
vardct still has several improvement possibilities
2021-07-23 07:40:37
I wouldn't be surprised if a 10 % improvement was possible overall
lithium
2021-07-23 07:42:35
I don't have copyright for this sample, but I think I can upload some sample in this channel?(for private use)
_wb_
2021-07-23 07:43:59
Yes, that should be fair use
lithium
2021-07-23 07:48:07
comic grayscale sample collect from anime discuss site.
2021-07-23 07:48:13
001
2021-07-23 07:48:22
002
2021-07-23 07:48:28
003 // grayscale-png and grayscale-jpg is same image, grayscale-jpg convert to grayscale-png.
2021-07-23 07:48:50
ok
Jyrki Alakuijala
2021-07-23 07:49:30
one good smoke test is to take a screenshot of the image when displayed 1:1
2021-07-23 07:49:48
then compress the screenshot with vardct d1 -s7 and -s8
2021-07-23 07:50:23
that gets rid of some ICC or gamma issues as well as possibly 'grayscaleness', too
lithium
2021-07-23 08:01:46
I tried another png and jpg grayscale comic sample in the last month, but I don't get issue on cjxl d 1.0 s 7, those image can correct reduce size, maybe some specific grayscale pattern will happen some strange behavior ?
Jyrki Alakuijala
2021-07-23 08:06:04
I did reduce masking recently and that would increase slightly filesizes os s8 and s9
2021-07-23 08:06:17
(a change in butteraugli)
lithium
2021-07-24 07:43:39
Look like avifenc can correct reduce grayscale-jpg and grayscale-png file size for this sample, I guess maybe jxl vardct have some grayscale issue? > --min 24 --max 26 --minalpha 0 --maxalpha 0 -d 10 -s 4 -j 12 -a end-usage=q -a cq-level=24 -a color:enable-chroma-deltaq=1 > --min 20 --max 22 --minalpha 0 --maxalpha 0 -d 10 -s 4 -j 12 -a end-usage=q -a cq-level=20 -a color:enable-chroma-deltaq=1 > // grayscale-png and grayscale-jpg is same image, grayscale-jpg convert to grayscale-png. > // avifenc > grayscale-jpg-7,449,514 => avif-q24-26-3,602,081 > grayscale-jpg-7,449,514 => avif-q20-22-4,030,022 > grayscale-png-4,553,432 => avif-q24-26-3,602,081
2021-07-24 07:51:00
> // cjxl -d 1 -s 7 > grayscale-jpg-7,449,514 => jxl-j-d1.0-s7-6,365,980 > grayscale-png-4,553,432 => jxl-d1.0-s7-6,365,983
2021-07-24 09:42:34
> // cjxl -d 2 -s 7 > grayscale-jpg-7,449,514 => jxl-j-d2.0-s7-4,563,677 > grayscale-png-4,553,432 => jxl-d2.0-s7-4,563,680
Jyrki Alakuijala
2021-07-26 12:31:45
WebP had a bug for grayscale images where they tooks about 70 % more bytes than necessary -- there an failed and overly optimistic early-out mechanism resulted gray scale to be changed into color by its color cross-decorrelation (similar to CfL) techniques
2021-07-26 12:32:26
I fixed that somewhere between 2015-2017 or so
2021-07-26 12:32:53
That was also the main secret why FLIF was so much better than WebP lossless at that time -- many of the test corpora FLIF used were gray scale
2021-07-26 12:33:06
I hope we don't have the same mistake again πŸ™‚
Scope
2021-07-26 12:37:04
https://discord.com/channels/794206087879852103/803645746661425173/843757478603784222
fab
2021-07-26 08:11:29
what is a cbz file
2021-07-26 08:11:32
what is a comic
2021-07-26 08:11:43
i read that is a group of images
2021-07-26 08:11:48
but can't jxl should do that
2021-07-26 08:11:59
what is the need of such format?
2021-07-26 08:12:12
i want to make a images pdf
eddie.zato
fab what is a cbz file
2021-07-26 08:30:39
https://en.wikipedia.org/wiki/Comic_book_archive
_wb_
2021-07-26 09:17:33
It's basically just a zip file containing images
2021-07-26 09:18:27
I would assume that if a viewer supports jxl and it supports cbz, it will also support cbz containing jxl (instead of png/jpg)
Eugene Vert
2021-07-26 11:14:12
Kde okular w/ qt plugin supports jxl images in cbz
2021-07-26 11:17:07
Seems like YACReader too
Deleted User
2021-07-26 12:39:49
Well, but this shouldn't be necessary since JXL supports multiple pages and browsers/viewers/Cloudinary already offer functions to view a specific page or go forward/backwards. <@!794205442175402004> Am I right? ;P
_wb_
2021-07-26 12:40:47
uh, at the moment not really πŸ™‚
2021-07-26 12:42:01
could make that work though, just use max duration frames and call it pages
2021-07-26 12:42:28
but browsers/viewers typically don't have buttons to go to next/previous frames in animations
Deleted User
2021-07-26 12:48:14
XnView and IrfanView do have those buttons (I don't have other viewers but it shouldn't be too uncommon). Browsers show navigation buttons for PDFs, so why shouldn't they just reuse them when a multipage JXL is opened.
_wb_
2021-07-26 12:52:48
yes, it makes sense to me β€” but at the moment they'll just show the first page and billions of years later they will show the second page.
Deleted User
2021-07-26 12:54:16
But I thought it was possible to do true multipage files without animation duration?
_wb_
2021-07-26 12:59:14
no, we don't have that concept - but we could have a convention "max frame duration means multipage"
2021-07-26 01:00:21
the max duration of a frame that can be signaled is 146 billion years
2021-07-26 01:02:24
I think it's safe to assume that such a convention wouldn't limit the possibilities of actual animations, and if a viewer doesn't know about the convention the worst that will happen is that it will automatically go to the next page after 146 billion years
Deleted User
2021-07-26 01:17:51
πŸ‘Œ
_wb_
2021-07-26 01:40:12
2 bytes in the global header and 4 bytes per frame (duration is signaled per frame, expressed in ticks of a duration specified globally)
2021-07-26 01:57:05
actually I miscalculated, max frame duration is only 139000 years
2021-07-26 01:58:49
1024 seconds is the max tick duration, 2^32 is the max number of ticks per frame
improver
2021-07-26 01:59:55
merely 139000 years :<
_wb_
2021-07-26 02:01:00
max fps is 2^30, but that's the minimum tick duration (1/2^30 seconds), hence my confusion
yurume
improver merely 139000 years :<
2021-07-26 02:10:24
but if it's en route to the blackhole? :p
spider-mario
2021-07-26 02:11:21
hm, that makes it tricky to represent multiple animated pages
2021-07-26 02:11:28
like a Harry Potter newspaper or something like that
_wb_
2021-07-26 02:15:13
right
2021-07-26 02:15:23
let's say the tick duration can be whatever
2021-07-26 02:15:40
but if the frame duration is 2^32 ticks, it's considered a new page
2021-07-26 02:17:02
if you want to do 30 fps animation on your Harry Potter pages, that's only 4.5 years per page then
2021-07-26 02:17:18
still probably enough in practice to not really have accidental page flips πŸ™‚
2021-07-26 02:18:07
one thing that cannot be done this way though is looping animation on a page
diskorduser
2021-07-26 02:45:54
Cbz is simple and good enough.
_wb_
2021-07-26 03:19:13
It's a bit overkill imo, to use general-purpose compression on top of special-purpose compression
2021-07-26 03:20:01
I mean it works (zip will just fallback to no-op compression and be a glorified tar)
2021-07-26 03:20:51
and it has the advantage of being easy to use with existing tools (I mean extracting or inserting pages, etc)
2021-07-26 03:22:24
but imo it would be nice if it would also work in browsers, basically as a PDF alternative when you don't need vector stuff
2021-07-26 03:22:39
(for comics or photo series)
improver
2021-07-26 03:37:51
i doubt controls for flipping pages are going to be added anytime soon
2021-07-26 03:38:39
to browsers i mean
2021-07-26 03:38:46
meanwhile, custom js viewers or PDFs work good enough i guess
_wb_
2021-07-26 03:39:35
i guess - at least when PDF supports jxl πŸ™‚
diskorduser
2021-07-26 04:45:59
I like to have multilayered jxl on comics / Mangas. One language per layer!
_wb_
2021-07-26 05:59:43
That's an interesting idea
2021-07-26 06:00:15
The layers would have to be invisible frames, otherwise a viewer would just show all languages on top of eachother
2021-07-26 06:01:11
(or they could be visible frames but underneath the comics themselves, so you see blank comics in a dumb viewer)
2021-07-26 06:02:05
(or probably best to have one language above the comic and the rest underneath, so you see a default language by default)
2021-07-26 06:03:18
Layers can have names, so the best way to do this would be to come up with a naming convention, and then have a viewer that does smart things when it sees layers with such names.
Scope
2021-07-27 07:57:13
https://www.reddit.com/r/programming/comments/osj2i8/for_developers_apples_safari_is_crap_and_outdated/
spider-mario
2021-07-27 08:36:37
> The HandBrake Team is pleased to announce the release of HandBrake 1.4.0. > > This is a significant feature release that focuses on: > - Further refining the HandBrake engine to support native 10 and 12-bit encodes, including HDR10 metadata passthru. https://handbrake.fr/news.php
2021-07-27 08:36:39
noice
2021-07-27 08:37:54
https://handbrake.fr/docs/en/latest/technical/hdr10.html > For x265 encodings, HandBrake will also set the hdr-opt flag for you. I don’t know what the hdr-opt flag does but that sounds nice too
BlueSwordM
spider-mario > The HandBrake Team is pleased to announce the release of HandBrake 1.4.0. > > This is a significant feature release that focuses on: > - Further refining the HandBrake engine to support native 10 and 12-bit encodes, including HDR10 metadata passthru. https://handbrake.fr/news.php
2021-07-28 04:11:00
Still not SVT-AV1 support in Handbrake SMH.
_wb_
Scope https://www.reddit.com/r/programming/comments/osj2i8/for_developers_apples_safari_is_crap_and_outdated/
2021-07-28 05:56:27
https://www.reddit.com/r/programming/comments/osj2i8/comment/h6st21y/
lonjil
2021-07-29 11:39:25
Does anyone know a good application for comparing images?
AceHW
2021-07-30 12:28:43
Does GIMP on Linux support jpeg-xl?
diskorduser
2021-07-30 01:15:05
Yes with plugin
2021-07-30 01:15:44
But it's buggy right now
AceHW
2021-07-30 01:31:35
k thanks
BlueSwordM
AceHW Does GIMP on Linux support jpeg-xl?
2021-07-30 03:06:36
Yes, but lossless JXL recompression is currently borked with it.
2021-07-30 03:06:43
Mostly due to the container format.
AceHW
2021-07-30 03:07:07
πŸ‘
190n
2021-07-30 03:13:00
how would gimp do lossless jxl recompression? unless you open a jpeg and don't modify it at all, but in that case you don't need gimp
BlueSwordM
190n how would gimp do lossless jxl recompression? unless you open a jpeg and don't modify it at all, but in that case you don't need gimp
2021-07-30 03:58:17
The problem is actually decoding the jxl recompressed jpg.
2021-07-30 03:58:36
The plugin can't actually open them.
190n
2021-07-30 04:01:39
<:WTF:805391680538148936>
2021-07-30 04:02:04
hope they get that fixed soon
spider-mario
lonjil Does anyone know a good application for comparing images?
2021-07-30 08:23:56
don’t know if you’d consider it β€œgood” but we have one in the jxl repo
2021-07-30 08:25:18
needs building with `cmake -DJPEGXL_ENABLE_VIEWERS=YES`, then it’s `tools/comparison_viewer/compare_images <left> <right> [<optional middle>]` (that is, it supports 3-way comparisons)
2021-07-30 08:25:45
you can move the line with the mouse, or use the left/up/right arrow keys to show just one of the images at a time
lonjil
2021-07-30 12:00:39
I'll try it
2021-07-30 09:22:41
oh this is great
2021-07-30 09:23:54
My d0.5 jxl is much smaller than my q95 mozjpeg, and has way less artefacting :)
Jyrki Alakuijala
2021-08-03 05:58:47
less ringing https://github.com/libjxl/libjxl/pull/403
2021-08-03 07:09:01
d16 before
2021-08-03 07:09:23
d16 after
2021-08-03 07:10:21
(((of course I hope that no one actually compresses at d16 ever)))
2021-08-03 07:11:16
those images are 0.19 and 0.20 bpp
2021-08-03 07:11:58
I wanted to improve a bit on this since this is one of the two cases where JPEG XL performs worse than AVIF
raysar
2021-08-03 07:12:42
You can choose this optim only for high distance, an old optim for low distance?
Jyrki Alakuijala
2021-08-03 07:13:04
it is always on by default
2021-08-03 07:13:29
I have made it such that it ramps down for low distances and barely changes things there
2021-08-03 07:15:58
.... I have more ideas on how to reduce ringing, next in line would be small ringing artefacts that are very close to the edge
fab
2021-08-03 07:16:04
madonna
Jyrki Alakuijala
2021-08-03 07:16:33
I observe sometimes there is a spiky pixel pointing out close to an edge and it looks weird
fab
2021-08-03 07:16:46
super
Jyrki Alakuijala
2021-08-03 07:17:01
but it happens rarely -- so it is possible to handle by adaptive quantization if I can figure out how to detect it
2021-08-03 07:17:09
thank you πŸ˜„
fab
2021-08-03 07:17:47
should i execute that command
2021-08-03 07:17:48
for %i in (D:\BDS\jpg\*.jpg) do cjxl -j -s 2 -d 1.238 --use_new_heuristics --gaborish==0 --epf=2 --patches=0 --dots=1 %i %i.jxl
2021-08-03 07:17:57
or wait for better automatic quality conversion tool?
Scope
2021-08-03 07:23:33
AVIF (10-bit 8,461)
2021-08-03 07:23:42
fab
Jyrki Alakuijala d16 after
2021-08-03 07:27:36
what is the file size of both in bytes?
spider-mario
2021-08-03 07:30:31
640Γ—400 pixels Γ— 0.2β€―bpp β‰ˆ 6.4β€―kB
Scope
2021-08-03 07:30:47
AVIF (10-bit 5,661)
2021-08-03 07:31:07
2021-08-03 07:35:01
Some of the image is no longer readable, but AVIF is still strong in this sort of thing So the gap is still quite large, but the improvement in JXL ringing is pretty noticeable
_wb_
2021-08-03 07:38:56
I think for an image like this we need to have the equivalent of palette blocks, i.e. do the hard edge regions with no-dct techniques. I am on holidays atm but afterwards I might give it a try to extend Patches into extracting regions where dct is a bad idea and doing something modular instead there (delta palette, or quantize colors and subtract).
fab
2021-08-03 08:11:33
only i i think that the jxl image is perfectly legible in 80% of image?
Jyrki Alakuijala
Scope Some of the image is no longer readable, but AVIF is still strong in this sort of thing So the gap is still quite large, but the improvement in JXL ringing is pretty noticeable
2021-08-03 10:36:00
I don't expect to fully catch up for this kind of content against speed 0 AVIF
2021-08-03 10:36:32
perhaps if they are run with similar encoding speeds
2021-08-03 10:37:11
perhaps a 2x upsampling might make jpeg xl more competitive
_wb_ I think for an image like this we need to have the equivalent of palette blocks, i.e. do the hard edge regions with no-dct techniques. I am on holidays atm but afterwards I might give it a try to extend Patches into extracting regions where dct is a bad idea and doing something modular instead there (delta palette, or quantize colors and subtract).
2021-08-03 10:38:44
The palette codes we have deal with pixels -- VarDCT and AVIF deal with pretty large chunks of the image and approximate wildly there
2021-08-03 10:39:02
I don't think palette will bring us there
2021-08-03 10:39:49
layers and 2x subresolution might help a bit
2021-08-03 10:39:55
...
2021-08-03 10:40:06
classic palette coding tends to operate in 3-4 bpp
2021-08-03 10:40:16
with delta palette we can drop it to 2 bpp
2021-08-03 10:40:33
when we approximate a lot, we can go to 1 bpp -- but it will usually be ugly
2021-08-03 10:41:02
... our delta palette defaults currently to about 2 bpp for a large photographic corpus with lots of visual activity
2021-08-03 10:42:54
the AVIF image looks palettized
Scope
2021-08-03 10:46:55
AVIF (10-bit 6,462) - Speed 6 I haven't measured the exact encoding speed, but the latest versions of Avifenc (Aom) have got a significant improvement in speed, even on slower modes
2021-08-03 10:47:01
Jyrki Alakuijala
2021-08-03 10:52:00
Thank you Scope!
2021-08-03 10:52:46
looks like AVIF polygonalizes some of the balls and letters and others it pixelizes
2021-08-03 10:53:17
the polygonalization may be an emerging thing from the directional prediction
2021-08-03 10:54:33
I'm not sure how the pixelization is modeled -- is it through the 8-color palette transform or something else
diskorduser
2021-08-04 03:48:07
Why not release jxl codec on windows store? Jxl codec on windows store improves adoption. Waiting for Microsoft will take more time.
fab
2021-08-04 03:49:28
windows 11 is out in a month
2021-08-04 03:49:43
in october surely out of stable
2021-08-04 03:49:55
september first LICENSED GPU AND MOTHERBOARD
2021-08-04 03:50:07
or at least driver in november/october
2021-08-04 03:50:17
jpeg xl is a software
2021-08-04 03:50:27
and should be treated as a software
2021-08-04 03:50:35
if things were simple as this
2021-08-04 03:50:47
i'm tired
Scope
2021-08-04 04:33:43
I do not think that the Windows store will solve the problem of widespread distribution, moreover, at the moment it only accepts special UWP applications and for publishing and updates will require additional free hands of those who are familiar with the Windows store Also it makes no sense to release console coders in the store (besides they are not UWP), mass Windows users rarely use console applications, mostly they need support in popular GUI applications, also to create a more trusted release it is needed publication from Google itself as a company (not sure it will be easy) otherwise it will not differ from various third party, including junk/advertising and other applications which also happen to be in the store So, maintaining WIC decoder release on libjxl Github will be enough as an official decoder, until Microsoft releases its own version as it did with WebP and AVIF
fab
2021-08-04 04:52:13
Microsoft should release it Not Google
_wb_
2021-08-04 09:53:44
https://twitter.com/jonsneyers/status/1423037459009613826?s=19
diskorduser
Scope I do not think that the Windows store will solve the problem of widespread distribution, moreover, at the moment it only accepts special UWP applications and for publishing and updates will require additional free hands of those who are familiar with the Windows store Also it makes no sense to release console coders in the store (besides they are not UWP), mass Windows users rarely use console applications, mostly they need support in popular GUI applications, also to create a more trusted release it is needed publication from Google itself as a company (not sure it will be easy) otherwise it will not differ from various third party, including junk/advertising and other applications which also happen to be in the store So, maintaining WIC decoder release on libjxl Github will be enough as an official decoder, until Microsoft releases its own version as it did with WebP and AVIF
2021-08-05 02:09:26
I'm talking about releasing something like avif in windows store. Not the command line cjxl / djxl.
eddie.zato
2021-08-05 05:13:56
> maintaining WIC decoder release on libjxl Github will be enough as an official decoder Yep. As I mentioned before, the WIC codec for WebP became available very early in the Google WebP repo, and that was a good thing.
fab
2021-08-05 07:32:16
No install for all Windows 11 users at least in the Second update
2021-08-05 07:32:56
It hasnt sense to make it available for only nerd people
2021-08-05 07:33:22
Or only for browser
2021-08-05 07:37:46
nek isn't spam. i should think it should be installed for all.
2021-08-05 07:38:11
and all social should make it possible only to save jxl, as png you can save only png
2021-08-05 07:38:33
why complicate things for me to make simpler for facebook mobile users
2021-08-05 07:39:27
nek; facebook mobile users don't care about this program
eddie.zato
2021-08-05 07:44:51
Facebook mobile users don't care about format and saving images. They simply view images in the app.
fab
2021-08-05 07:48:20
i personally save images both on pc and mobile
2021-08-05 07:48:35
and i don't want 2 extras compression
2021-08-05 07:48:58
i want support in android 12 and windows 11
2021-08-05 07:49:06
i'm requesting too much
2021-08-05 07:49:41
you don't want those things?
2021-08-05 07:50:33
you want to remain with jpg?
eddie.zato
2021-08-05 07:55:50
Personally, I already have jxl support on windows 10 with my usually used viewing apps: qimgv and yacreader. These apps will work fine on windows 11 as well. For android 10 I can wait.
fab
2021-08-05 09:56:49
Why people should Not have jxl is there a reason to not enable it
raysar
eddie.zato Personally, I already have jxl support on windows 10 with my usually used viewing apps: qimgv and yacreader. These apps will work fine on windows 11 as well. For android 10 I can wait.
2021-08-05 11:41:44
how do you read jlx with qimgv? i add qjpegxl.dll, but it not works
eddie.zato
2021-08-05 12:03:42
qimgv is built with msys2/mingw64, so qt plugins should also be built with it. Dll's from novomesk are built with the MS compiler, they work well with nomacs because it is built with the MS compiler too. So I had to build qt plugins myself with msys2/mingw64.
2021-08-05 12:08:28
I ended up having to figure out how to build all these things with msys2/mingw64: qimgv, yacreader, and the qt plugins for avif and jxl. πŸ˜†
raysar
2021-08-05 12:12:08
Ah yes the custom build is here πŸ™‚ https://eddiezato.github.io/bin/
eddie.zato
2021-08-05 12:13:52
All of the scripts I wrote are here. If anyone finds it useful. https://github.com/eddiezato/builds
raysar
2021-08-05 12:14:51
My compatibility jxl software is even bigger <:Hypers:808826266060193874> https://docs.google.com/spreadsheets/d/1bTeraUXIl-nGM8c53IdURxmJbabX9eXqPZwVSynoH9U
eddie.zato
2021-08-05 12:23:49
The official yacreader is also built with the MS compiler, so novomesk's appveyor dlls will work fine.
fab
2021-08-07 10:01:43
https://github.com/d2phap/ImageGlass/pull/1121
diskorduser
2021-08-07 11:24:13
I don't see anything related to jxl
fab
2021-08-07 11:43:53
is on topic whatever else
_wb_
2021-08-10 07:51:50
Some images are 7000 bpp
2021-08-10 07:53:02
(if you have a 1x1 pixel image with a color profile, it's easy to even go over 9000 bpp)
2021-08-10 07:53:29
https://c.tenor.com/jkg42Y08bNAAAAAM/its-over9000-vegeta.gif
Fraetor
2021-08-11 03:06:23
Anyone know any Linux image viewers with JPEG XL support on Debian Unstable? Or do I need to package libjxl for Debian instead to get support in the gpixbuf viewers?
Crixis
2021-08-11 03:15:47
You can compile for gpix buf
Fraetor Anyone know any Linux image viewers with JPEG XL support on Debian Unstable? Or do I need to package libjxl for Debian instead to get support in the gpixbuf viewers?
2021-08-11 03:16:38
## Build + plugin ```bash sudo apt install -y cmake pkg-config libbrotli-dev libgif-dev libjpeg-dev libopenexr-dev libpng-dev libwebp-dev git libgdk-pixbuf2.0-dev clang-11 xdg-utils export CC=clang-11 CXX=clang++-11 git clone https://github.com/libjxl/libjxl.git --recursive cd libjxl mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_PLUGINS=ON .. cmake --build . -- -j$(nproc) sudo cmake --install . cd .. sudo xdg-mime install --novendor plugins/mime/image-jxl.xml sudo /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache sudo update-desktop-database ```
2021-08-11 03:17:07
eog will work
Fraetor
2021-08-11 03:18:23
Thanks, I'll compile it up then.
Crixis ## Build + plugin ```bash sudo apt install -y cmake pkg-config libbrotli-dev libgif-dev libjpeg-dev libopenexr-dev libpng-dev libwebp-dev git libgdk-pixbuf2.0-dev clang-11 xdg-utils export CC=clang-11 CXX=clang++-11 git clone https://github.com/libjxl/libjxl.git --recursive cd libjxl mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_PLUGINS=ON .. cmake --build . -- -j$(nproc) sudo cmake --install . cd .. sudo xdg-mime install --novendor plugins/mime/image-jxl.xml sudo /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache sudo update-desktop-database ```
2021-08-11 03:52:02
Mostly seems to work, but the mime type doesn't seem to have been set up.
2021-08-11 03:52:24
2021-08-11 03:55:24
Ah, do I need to add image/jxl to eog's desktop file?
Fraetor Ah, do I need to add image/jxl to eog's desktop file?
2021-08-11 04:08:35
Yep. That seemed to fix it.
2021-08-11 04:09:40
Added the mime type to eog's desktop file and ran `sudo update-desktop-database`
diskorduser
2021-08-11 04:23:13
Need gimp 3 compatible jxl plugin πŸ₯²
veluca
Fraetor Anyone know any Linux image viewers with JPEG XL support on Debian Unstable? Or do I need to package libjxl for Debian instead to get support in the gpixbuf viewers?
2021-08-11 05:03:50
FWIW we do have the infrastructure in place for building debian packages, but my attempts to get some debian maintainers to consider libjxl for inclusion haven't gotten anywhere so far...
Fraetor
2021-08-11 05:09:19
TBF, it might improve when bullseye ships on the 18th.
veluca
2021-08-11 05:09:43
ehhhh, I'm pretty sure I wrote them in January or so πŸ˜› but maybe...
Fraetor
2021-08-11 05:09:45
As unstable has been in various stages of freeze for the past few months.
veluca
2021-08-11 05:09:49
if you know people you can ping...
2021-08-11 05:10:42
ah, it was in April
2021-08-11 05:10:44
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=948862
Fraetor
2021-08-11 05:12:31
Yeah, unstable has been in soft freeze from Febuary.
2021-08-11 05:12:32
https://release.debian.org/
2021-08-11 05:12:48
So they wouldn't add any new packages.
veluca
2021-08-11 05:13:39
fair enough
2021-08-11 05:14:01
so you're saying next week is a good time to poke that thread
Fraetor
2021-08-11 05:16:00
If you give it a week or two from the release of bullseye they might be a bit more responsive, as for the first week they will be flooded with updating all of the packages that have had updates in the past 6 months.
2021-08-11 05:17:05
But yeah, after the new release of stable they will be much more willing to accept new packages.
diskorduser
diskorduser Need gimp 3 compatible jxl plugin πŸ₯²
2021-08-11 06:41:23
https://redd.it/p2hkuz Noice
2021-08-12 01:59:12
That guy makes good plugins. Probably it will work fine :p
2021-08-12 02:05:33
You could download gimp 2.99 chaoutic aur repo. Gimp 2.99 doesn't crash. I have been using it for several months.
2021-08-12 03:11:37
http://0x0.st/-J4e.jpg
2021-08-12 03:13:51
I think it's better to use quality than distance parameter. People will get confused on seeing distance
Scope
2021-08-13 10:13:06
https://twitter.com/arxiv/status/1426151552381702150
Eugene Vert
2021-08-14 08:53:29
Is there a good way to detect is image grayscale/monochrome?
_wb_
2021-08-14 08:57:36
Only way I can imagine is checking all pixels and stopping when one pixel has `!(R==G==B)`
Eugene Vert
2021-08-14 09:05:55
But it won't work for monochrome images? I tried to do this using the chroma threshold test on each pixel of resized image, but it doesn't work with monochrome images either or gives a lot of false-positives 😦
2021-08-14 09:57:52
Oh, nvm, first google link, with the right query https://stackoverflow.com/questions/20068945/detect-if-image-is-color-grayscale-or-black-and-white-with-python-pil
Jyrki Alakuijala
diskorduser I think it's better to use quality than distance parameter. People will get confused on seeing distance
2021-08-15 12:05:36
I think there we should change -- quality value 30 in photoshop means 75 in libjpeg (or something similar)
2021-08-15 12:06:09
distance values as multiples of 'just-noticeable-difference' values make more sense
2021-08-15 12:07:17
even some professionals get trapped by the quality and many think that libjpeg quality 30 images are around in the internet because image processing guides (for photoshop) recommend it for the internet
2021-08-15 12:07:27
as a consequence a huge amount of confusion in quality values
2021-08-15 12:07:38
also, every new compressor inflates the quality values a little
2021-08-15 12:08:13
webp quality 95 is perhaps quality 90 in libjpeg etc.
lithium
2021-08-15 05:16:46
How input non-unicode support windows file path to cjxl? I using windows code page 950, If I pass japanese path(code page 932) to cjxl will happen some issue, this issue also happen some cli tools, and I guess windows 10 still don't have native utf-8 support. > // windows-code page 950 > cjxl -d 1 -e 7 D:\\γƒ†γ‚Ήγƒˆ\\γƒ†γ‚Ήγƒˆ-01.png
Fraetor
2021-08-15 06:47:19
I thought Windows 10 used UTF-32 internally.
spider-mario
2021-08-15 07:56:43
UTF-16
2021-08-15 07:56:54
but there is now also beta support for making the local codepage (β€œANSI”) UTF-8
2021-08-15 07:58:06
in fact, as a possible alternative to the Unicode Win32 APIs (the functions ending with W), Microsoft now suggests using the old β€œANSI” functions (those ending with A) + adding an app manifest to make the ANSI codepage UTF-8
2021-08-15 07:58:31
https://docs.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page
2021-08-15 08:00:30
I used to have problems passing filenames with diacritics to ImageMagick before changing that setting, but now it works
2021-08-15 08:01:58
(and yes, UTF-16 is the worst of both worlds, having the simultaneous drawbacks of UTF-8 and UTF-32 and the advantages of neither)
2021-08-15 08:12:45
although in truth, thinking about it, there isn’t that much advantage to UTF-32 either
2021-08-15 08:13:06
code points are a constant number of code units, but grapheme clusters can consist of several code points anyway
2021-08-15 08:16:17
really, UTF-8 is probably all we should be using
_wb_
2021-08-15 08:44:06
Yep
2021-08-15 08:50:16
I wonder if it would make sense to define a UTF-4 that is based on a smaller alphabet but still has the most common ascii symbols, like frequent lowercase latin letters and space, in a 4 bit direct code and uses an 8 bit code for the rarer ascii symbols. So you can often have two letters per byte...
2021-08-15 08:52:54
As it is now, a lot of the utf-8 single-byte codes are wasted on stuff like control characters etc
improver
2021-08-15 08:55:58
I don't think that ASCII-incompatible encoding would go anywhere
_wb_
2021-08-15 08:56:32
For byte-based compression it is probably nice if common combinations of frequent letters become a single byte that way (though there would be aligned and non-aligned occurrences so maybe not)
improver
2021-08-15 08:56:59
I believe that just doing generic compression would bring better results
_wb_
2021-08-15 08:57:19
Yes, of course in practice too much stuff needs to be ascii-compatible
improver
2021-08-15 08:57:46
also, 4 bits is merely 0-15 values, what you'd even fit there
2021-08-15 08:58:08
not to mention reserving at least one for escape
_wb_
2021-08-15 08:58:31
http://pi.math.cornell.edu/~mec/2003-2004/cryptography/subs/frequencies.html
2021-08-15 09:00:21
etaionsrhd, space, and the remaining are escape plus 2 bits?
improver
2021-08-15 09:00:42
such coding would inevitably introduce complications for non-english users, because we all know that others like putting limitations on resulting byte lengths, and not runes
2021-08-15 09:01:01
i don't really like such bias
_wb_
2021-08-15 09:01:32
Ascii is very biased towards english / latin alphabet languages without diacritics
improver
2021-08-15 09:01:35
that's like avif liking vector-ish stuff - not healthy
2021-08-15 09:03:51
yeah, but the world has already mostly settled on incorporating ascii (not necessarily english) for encoding of a lot of meta info, so there's advantages beyond just english, even if this was result of history and is pretty backwards
2021-08-15 09:04:54
that's why using utf-16 in html for japanese sites and such don't bring such a large advantage as one thing it would
2021-08-15 09:09:41
it may seem like stagnation, suboptimal for some languages, and biased, but it's kinda thing what was worked around so much that at this point re-introducing more complexity by defining something else would be net degradation of utility
2021-08-15 09:10:21
also it's not even that bad for latin-based langs, and there are quite a lot of them, outside of english
Fraetor
2021-08-15 10:42:10
The cost of having multiple possible encodes generally outweighs the cost of UTF-8 being non-optimal for certain use cases.
lithium
spider-mario in fact, as a possible alternative to the Unicode Win32 APIs (the functions ending with W), Microsoft now suggests using the old β€œANSI” functions (those ending with A) + adding an app manifest to make the ANSI codepage UTF-8
2021-08-16 08:17:49
<@!604964375924834314>, Thank you for your reply πŸ™‚ Look like utf-8 code page manifest requirement Windows 10 1903, I using Windows 10 1809 right now, I will test this feature after update windows version. If I want use utf-8 code page fusion manifest feature, I need create a cjxl.manifest.xml and pass mt.exe -manifest "D:\\γƒ†γ‚Ήγƒˆ\\cjxl.exe.manifest" -outputresource:"D:\\γƒ†γ‚Ήγƒˆ\\cjxl.exe";1 this feature should work very well with this setting? 1. create a cjxl.exe.manifest <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyIdentity type="win32" name="..." version="6.0.0.0"/> <application> <windowsSettings> <activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage> </windowsSettings> </application> </assembly> 2. cjxl.exe and cjxl.exe.manifest in same path 3. mt.exe -manifest "D:\\γƒ†γ‚Ήγƒˆ\\cjxl.exe.manifest" -outputresource:"D:\\γƒ†γ‚Ήγƒˆ\\cjxl.exe";1 4. cjxl -d 1 -e 7 "D:\\γƒ†γ‚Ήγƒˆ\\γƒ†γ‚Ήγƒˆ-01.png"
2021-08-16 08:20:16
I try windows 10 old UTF-8 codepage feature before, but that feature happen a lot of issue. 😒 > (previously was only available in control panel region-administrative as a Beta feature and affected all processes) > https://tedwvc.wordpress.com/2019/09/09/new-utf-8-features-in-windows-10-1903/
2021-08-16 08:30:46
I recommend libvips, ImageMagick gamma issue is very annoying. > https://github.com/libvips/libvips
Jyrki Alakuijala
_wb_ Ascii is very biased towards english / latin alphabet languages without diacritics
2021-08-16 10:38:09
Brotli compression in utf-8 mode makes utf-8 more tolerable for other languages
2021-08-16 10:42:02
When thinking more about image quality I believe that Photoshop is doing it better than libjpeg. Quality 5 photoshop should not be available to the users. The range available in a GUI should only include values that are actually useful (like done in Photoshop). I believe normal photoshop quality settings are libjpeg-like-quality 85-100 [photoshop quality 0..12], and then there is special casing for the web use case for roughly libjpeg-like-quality 60-100 [photoshop save-for-web-quality 10..100].
2021-08-16 10:42:53
Making qualities less than 60 available is like leaving loaded shotguns lying around in a community center
lithium
lithium <@!604964375924834314>, Thank you for your reply πŸ™‚ Look like utf-8 code page manifest requirement Windows 10 1903, I using Windows 10 1809 right now, I will test this feature after update windows version. If I want use utf-8 code page fusion manifest feature, I need create a cjxl.manifest.xml and pass mt.exe -manifest "D:\\γƒ†γ‚Ήγƒˆ\\cjxl.exe.manifest" -outputresource:"D:\\γƒ†γ‚Ήγƒˆ\\cjxl.exe";1 this feature should work very well with this setting? 1. create a cjxl.exe.manifest <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyIdentity type="win32" name="..." version="6.0.0.0"/> <application> <windowsSettings> <activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage> </windowsSettings> </application> </assembly> 2. cjxl.exe and cjxl.exe.manifest in same path 3. mt.exe -manifest "D:\\γƒ†γ‚Ήγƒˆ\\cjxl.exe.manifest" -outputresource:"D:\\γƒ†γ‚Ήγƒˆ\\cjxl.exe";1 4. cjxl -d 1 -e 7 "D:\\γƒ†γ‚Ήγƒˆ\\γƒ†γ‚Ήγƒˆ-01.png"
2021-08-16 10:57:12
> https://docs.microsoft.com/en-us/cpp/build/how-to-embed-a-manifest-inside-a-c-cpp-application?view=msvc-160 Finally I got it, how to use manifest feature...
spider-mario
2021-08-16 11:06:49
does it seem to solve the problem?
lithium
2021-08-16 11:15:27
I haven't test right now, because I not ready update to Windows 10 1903, but I want make clear this feature how to work, I only need create a cjxl.exe.manifest and pass mt.exe -manifest "D:\\γƒ†γ‚Ήγƒˆ\\cjxl.exe.manifest" -outputresource:"D:\\γƒ†γ‚Ήγƒˆ\\cjxl.exe";1 windows will pass utf-8 path to cjxl?
2021-08-16 11:19:19
I still have confused about windows manifest setting.
eddie.zato
2021-08-16 11:49:15
I personally use the "windows terminal". There is no problem at all.
2021-08-16 11:49:17
``` Microsoft Windows [Version 10.0.19043.1165] (c) Microsoft Corporation. All rights reserved. D:\Downloads>cjxl "γƒ†γ‚Ήγƒˆ.jpg" "γƒ†γ‚Ήγƒˆ.jxl" JPEG XL encoder v0.6.0 2ebc6ec [SSE4] Read 1920x1080 image, 270.8 MP/s Encoding [Container | JPEG, lossless transcode, squirrel | JPEG reconstruction data | 94-byte Exif], 4 threads. Compressed to 267431 bytes (1.032 bpp). 1920 x 1080, 41.22 MP/s [41.22, 41.22], 1 reps, 4 threads. Including container: 268060 bytes (1.034 bpp). ```
lithium
2021-08-16 12:27:14
Look like microsoft want user use newer windows. 😒 > Note: Windows Terminal requires Windows 10 1903 (build 18362) or later
2021-08-16 12:29:31
But I think I find some dirty method to handle japanese path for older windows.πŸ˜›
spider-mario
2021-08-16 01:05:30
8.3 names?
lithium
spider-mario 8.3 names?
2021-08-16 02:48:17
yes, 8.3 filename not a good method, but can avoid this issue.
2021-08-16 02:52:33
use windows terminal and utf-8 manifest is better, but requires newer windows 10 version.
2021-08-16 07:09:50
<@!604964375924834314> sorry for ping, I got some issues, I already update to windows 10 2004, but I can't find mt.exe, maybe I missing some setting? Could you teach me about manifest setting? And if I using 8.3 filename on windows 10 ntfs, I will get some trouble? > mt.exe -manifest "C:\Users\jpegxl_v0.5\cjxl.exe.manifest" -outputresource:"C:\Users\jpegxl_v0.5\cjxl.exe";#1
spider-mario
2021-08-16 07:10:32
apparently, it’s from the Windows SDK, so you might have to install that
2021-08-16 07:10:40
and as far as I know, no issue with using 8.3 names
2021-08-16 07:11:04
(in fact I had to explicitly disable the generation of 8.3 names for a drive because of the performance degradation that it caused)
lithium
2021-08-16 07:14:35
yes, I find some 8.3 filename performance issue, but windows terminal and utf-8 manifest need other depend component, I don't want my jxl tools have much depend, still can't find a perfect method to handle this.
2021-08-16 07:16:57
why microsoft does not implement a better utf-8 support.😒
2021-08-16 07:18:44
spider-mario, Thank you for your help πŸ™‚
190n
2021-08-18 01:04:16
does anyone who's used hugo (static site generator, <https://gohugo.io/>) know if there's a plugin or something that does really good image optimization? it has some support built in (https://gohugo.io/content-management/image-processing/), but it seems like you basically have to manually ask for all the variants. i'd really like if it would automatically create all the different formats at different pixel densities, and make a `<picture>` element with them all.
2021-08-18 01:15:51
so they might be waiting for a native go avif encoder <:monkaMega:809252622900789269>
diskorduser
2021-08-18 01:32:26
I use Gatsbyjs. It's easy to configure image types. (Has avif support)
improver
2021-08-18 01:38:38
native go avif encoder is unlikely anytime soon
190n
diskorduser I use Gatsbyjs. It's easy to configure image types. (Has avif support)
2021-08-18 01:39:18
yeah, i've heard of gatsby. the person i'm helping is using hugo and in general i'd like everyone to get good images without a lot of trouble.
improver
2021-08-18 01:39:21
or.. probably ever actually tbh
190n
2021-08-18 01:39:32
yeah that seems like it'd be a waste of time
improver
2021-08-18 01:40:25
decoder could b useful but im doubtful even that would happen soon
veluca
2021-08-18 09:03:33
I used hugo, but I don't know of any such thing πŸ˜›
Scope
2021-08-18 10:54:51
https://news.ycombinator.com/item?id=28215939
diskorduser
2021-08-20 04:57:22
How difficult is it to implement jxl's photon noise synthesis on a GPU? Photon noise removes banding in blurry areas and blends well to the image compared to KDE's noise synthesis.
2021-08-20 05:02:41
improver
2021-08-20 07:19:56
what app is that
diskorduser
2021-08-20 07:31:45
Telegram / nekogram
ishitatsuyuki
2021-08-20 08:32:33
lol got reposted
2021-08-20 08:33:41
Arun, just wait a while, I can probably give you a patch for high quality blur implementation in sacrifice of some performance
diskorduser
2021-08-20 10:51:01
Oh you're here. Nice
veluca
diskorduser How difficult is it to implement jxl's photon noise synthesis on a GPU? Photon noise removes banding in blurry areas and blends well to the image compared to KDE's noise synthesis.
2021-08-20 10:53:18
to answer that question, the hardest part is likely the RNG... if you are OK with slightly less good-looking noise patterns, it should be dead simple πŸ˜›
2021-08-20 10:54:07
(more precisely, slightly more repetitive)
diskorduser
ishitatsuyuki Arun, just wait a while, I can probably give you a patch for high quality blur implementation in sacrifice of some performance
2021-08-20 11:52:20
It may sound stupid but is it possible to use a pre-generated noise PNG? Windows 7 uses a png to simulate glassy effect. I even tried replacing glassy png with noisy one in windows7 msstyles to simulate a frosty effect.
ishitatsuyuki
2021-08-20 11:52:50
The problem is not the noise
2021-08-20 11:52:54
The problem is how you apply to it
diskorduser
2021-08-20 11:53:01
I see
ishitatsuyuki
2021-08-20 11:54:00
With sRGB framebuffer 1+1 may be 2 but 10+1 may be 10.5
Jyrki Alakuijala
veluca to answer that question, the hardest part is likely the RNG... if you are OK with slightly less good-looking noise patterns, it should be dead simple πŸ˜›
2021-08-20 02:10:49
professional photographers use a tiled texture for adding film grain -- that seems to me like something a GPU is able to compute if RND is too complicated -- could also be that some mixture of RND and texture tile could work (again if RND is too difficult)
2021-08-20 02:11:39
I don't think see why sufficient RND would be difficult though, but I'm not a GPU expert
veluca
2021-08-20 02:13:45
The rng we are using is sequential in 256*256 tiles which is not GPU ideal IIRC, you'd rather want one that is mostly pixel-independent
ishitatsuyuki
2021-08-20 02:41:15
it's not the rng, it's the blending
2021-08-20 02:42:15
when srgb blending is disabled (noise values are added as-is) it looks like this https://discord.com/channels/794206087879852103/806898911091753051/878278827695038484
veluca
2021-08-20 03:10:12
ah sure, but colorspace conversions are as GPU friendly as anything gets I think πŸ™‚
ishitatsuyuki
2021-08-20 03:16:44
toggling sRGB conversion requires at least one barrier on Vulkan, and on OpenGL it's nearly impossible
2021-08-20 03:17:53
well idk, maybe one can just use glDisable(GL_FRAMEBUFFER_SRGB) but it's quite tricky to get right
2021-08-20 03:18:41
just wondering, is JXL's noise added in linear space or perceptual space?
veluca
2021-08-20 03:27:42
perceptual πŸ™‚
ishitatsuyuki
2021-08-20 03:27:59
good, sounds like I can make an easy fix for the noise
veluca
2021-08-20 03:28:12
tbh I have no idea about opengl, I was mostly speaking about GPGPU
2021-08-20 03:28:28
(I only ever wrote CUDA code for the GPU)
ishitatsuyuki
2021-08-20 03:29:33
colorspaces conversions involve trascedentals so they can easily become very slow
2021-08-20 03:30:26
for this reason the gamma curve is often handled with a dedicated piece of hardware in the texture sampler, and that limits the API a lot
veluca
2021-08-20 03:42:40
for sRGB the only thing you really need is a decently-precise pow function, you can easily get one of those in ~10-20 flops or so (especially if you stick to 2.4 as your exponent)
2021-08-20 03:47:56
and, if you just want to be roughly perceptual... you can cheat and change the transfer function to something like `(x+a)^3-x^3` πŸ˜„
Halamix2
2021-08-21 08:15:53
Hello, do you know if there is a lower limit to bits per channel? I have a bunch of 16bit images (ARGB1555) and I wondered if they could be stored loselessly without conversion to ARGB8888
_wb_
2021-08-21 08:19:41
Jxl will end up doing channel palette
2021-08-21 08:20:39
You have to input the image as argb8888, because there is no input format for argb1555