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

jxl

Anything JPEG XL related

VEG
2021-05-15 11:29:09
And no, you don't need a BOM in file names. NTFS always stores file names as UTF-16 LE (UCS-2).
improver
2021-05-15 11:32:38
<https://en.wikipedia.org/wiki/Unicode_in_Microsoft_Windows#UTF-8> > In April 2018 with insider build 17035 (nominal build 17134) for Windows 10, a "Beta: Use Unicode UTF-8 for worldwide language support" checkbox appeared for setting the locale code page to UTF-8.[a] This allows for calling "narrow" functions, including fopen and SetWindowTextA, with UTF-8 strings. In May 2019 Microsoft added the ability for a program to set the code page to UTF-8 itself, and started recommending that all software do this and use UTF-8 exclusively.[1]
VEG
2021-05-15 11:33:21
Yeah, they added automatic conversion from UTF-8 to UTF-16 in the ANSI versions of functions a few years ago.
improver
2021-05-15 11:33:21
<https://docs.microsoft.com/en-us/windows/uwp/design/globalizing/use-utf8-code-page>
2021-05-15 11:33:47
p cool imo
VEG
2021-05-15 11:33:49
But internally UTF-16 is used everywhere anyway.
improver
2021-05-15 11:33:53
correct.
VEG
2021-05-15 11:34:27
And there are still too many machines working on Windows 7.
2021-05-15 11:35:39
So, UTF-8 can be used internally in a program, but it should convert UTF-8 to UTF-16 itself before calling Unicode versions of API functions. Of course, if a program supports older Windows versions πŸ™‚
Pieter
VEG If UTF-16 versions of functions are used, it works fine. UTF-16 is native for Windows NT.
2021-05-15 02:59:07
Well, sure, but that's annoying in cross-platform code, as AFAIK nothing else uses UTF-16 for filenames, so you need windows-specific conversion code.
VEG
2021-05-15 03:11:45
Everybody else were adding Unicode support much later when UTF-8 existed, and UTF-8 was the easiest way, without rewriting everything like Microsoft did. So yeah, there is a difference, and it is not convenient to handle this difference in cross platform programs in C.
2021-05-15 03:19:32
Microsoft wasn't the only company that thought that UTF-16 is the future. Java and JavaScript also use UTF-16 for all strings. UTF-16 was considered as "the Unicode" at that time.
2021-05-15 03:22:01
As far as I remember, some of MacOS APIs also use UTF-16, but Apple is not consistent, so it is not everywhere.
2021-05-15 03:29:08
C Runtime could hide this difference though, making all the conversions from UTF-8 to UTF-16 and back inside before and after making calls to Windows. If Windows API is not used directly, it should help to write cross platform programs easier.
2021-05-15 03:29:35
According to the docs, latest C runtime supports UTF-8: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?view=msvc-160#utf-8-support
2021-05-15 03:30:36
You should link it statically if you want to support older Windows version, and use `/utf-8` compiler switch to make all narrow strings UTF-8.
necros
2021-05-16 09:45:40
Does JXL support animation?
_wb_
2021-05-16 09:51:54
Yes, though browsers and many viewers don't support that yet
veluca
2021-05-16 09:54:51
(working on it... :P)
necros
2021-05-16 09:55:28
<@!794205442175402004> What viewer support it or none?
_wb_
2021-05-16 10:10:31
I don't know, actually
2021-05-16 10:11:41
Haven't tried any of the viewers yet, except for that MacOS one and `eog`, and both don't support animation yet
2021-05-16 10:12:12
You can make an animated jxl by doing cjxl foo.gif foo.jxl or cjxl foo.apng foo.jxl
veluca
2021-05-16 02:00:22
first question: yes
2021-05-16 02:00:40
second question: "more than you need" is likely the best answer πŸ˜›
2021-05-16 02:00:44
(3x floats)
2021-05-16 02:00:52
or 3x 32-bit ints
_wb_
2021-05-16 02:04:50
One profile for the whole animation
2021-05-16 02:05:38
Alpha blending between frames with a different profile is kind of unnecessarily tricky
2021-05-16 02:06:33
Or even just replacing a region of a frame with something in a different colorspace
2021-05-16 02:07:36
Given your second question: you're not confusing color profiles with palettes, right?
veluca
2021-05-16 02:13:33
yep, you do
improver
2021-05-16 02:16:12
tbh makes sense from implementation perspective. would be quite complicated for little gain
_wb_
2021-05-16 02:21:43
Also we probably currently don't have a good way to feed non-sRGB animations as input to cjxl
2021-05-16 02:22:19
I think the apng loader is ignoring the icc profile, not sure though
2021-05-16 02:23:25
Well you could I guess pass an explicit option to cjxl to set the colorspace, like what you can do with ppm input
2021-05-16 02:27:47
Yes this is not well documented
improver
2021-05-16 02:28:15
`color_space` is for that enum stuff?
_wb_
2021-05-16 02:28:30
Yes
2021-05-16 02:28:39
But I always forget the syntax
diskorduser
2021-05-16 05:42:29
How do I properly convert a prophoto rgb 16 bit Tiff to prophoto 16bit jxl or srgb 8/16bit jxl?
_wb_
2021-05-16 06:32:42
convert blah.tiff bloh.png; cjxl bloh.png yay.jxl
2021-05-16 06:33:05
-q 100 if you want it lossless
Lastrosade
2021-05-16 07:36:51
I had to do this last time cjxl failed to keep icc data ``` convert heic1502a.psb heic1502a.ppm convert heic1502a.psb heic1502a.icc cjxl -d 0 -s 3 -x icc_pathname=heic1502a.icc heic1502a.ppm heic1502a.jxl ``` This 69536x22230 image is a nightmare to encode anyways imagemagick crashed on png and ffmpeg wouldn't even try
fab
2021-05-16 07:44:31
but if i want to buy a smart tv for example lg
2021-05-16 07:44:37
can it support jxl?
2021-05-16 07:44:47
or should i convert to png?
_wb_
2021-05-16 07:49:35
Depends on how upgradeable its software is, I guess. You want to like plug in a USB stick with jxl files?
2021-05-16 07:50:09
I don't think you can expect that to work anytime soon
fab
2021-05-16 07:57:48
no all by bluetooth
2021-05-16 07:58:00
or by visiting the browser
_wb_
2021-05-16 08:01:29
Well if the browser gets updates then maybe
Master Of Zen
2021-05-16 08:16:42
Have this error when try to compile jxl git on arch: ```text src/qjpegxlhandler.cpp: In member function β€˜virtual bool QJpegXLHandler::write(const QImage&)’: src/qjpegxlhandler.cpp:454:18: error: β€˜JxlEncoderSetICCProfile’ was not declared in this scope; did you mean β€˜JxlDecoderGetICCProfileSize’? 454 | status = JxlEncoderSetICCProfile(encoder, (const uint8_t *)iccprofile.constData(), iccprofile.size()); | ^~~~~~~~~~~~~~~~~~~~~~~ | JxlDecoderGetICCProfileSize make: *** [Makefile:708: .obj/qjpegxlhandler.o] Error 1 make: *** Waiting for unfinished jobs.... Failed to build libqjpegxl.so ==> ERROR: A failure occurred in build().```
veluca
2021-05-16 09:30:59
can you file a bug?
Nova Aurora
Master Of Zen Have this error when try to compile jxl git on arch: ```text src/qjpegxlhandler.cpp: In member function β€˜virtual bool QJpegXLHandler::write(const QImage&)’: src/qjpegxlhandler.cpp:454:18: error: β€˜JxlEncoderSetICCProfile’ was not declared in this scope; did you mean β€˜JxlDecoderGetICCProfileSize’? 454 | status = JxlEncoderSetICCProfile(encoder, (const uint8_t *)iccprofile.constData(), iccprofile.size()); | ^~~~~~~~~~~~~~~~~~~~~~~ | JxlDecoderGetICCProfileSize make: *** [Makefile:708: .obj/qjpegxlhandler.o] Error 1 make: *** Waiting for unfinished jobs.... Failed to build libqjpegxl.so ==> ERROR: A failure occurred in build().```
2021-05-17 12:37:05
Is this the AUR version or the straight up git?
jjido
2021-05-17 12:38:21
How does XYB colorspace work? I found this information: https://twitter.com/jyzg/status/1271026772973432834 https://raphlinus.github.io/color/2021/01/18/oklab-critique.html
2021-05-17 12:39:00
How to generate a green image? https://jxl-art.surma.technology/?zcode=i4h04uLKTFNIVrBTMOBSUIAyDYFMBQVdheDUEgVDAwMDJK4RmAdnG3ABAA%3D%3D
Nova Aurora
jjido How to generate a green image? https://jxl-art.surma.technology/?zcode=i4h04uLKTFNIVrBTMOBSUIAyDYFMBQVdheDUEgVDAwMDJK4RmAdnG3ABAA%3D%3D
2021-05-17 12:45:40
This is what I came up with: https://jxl-art.surma.technology/?zcode=y0xTSFawUzDgUlDIhDANgUwFBV2F4NQSBQMgQOIaQbhIcgA%3D
2021-05-17 12:46:02
I have no Idea how to do it with XYB
improver
2021-05-17 03:15:06
just do libjpegxl-git for now i guess
jjido
2021-05-17 06:59:35
Got green https://jxl-art.surma.technology/?zcode=i4h04uLKTFNIVrBTMOBSUIAyDYFMBQVdheDUEgVdQwMDA2S%2BEYSPLAsA
2021-05-17 07:06:27
Yellow https://jxl-art.surma.technology/?zcode=i4h04uLKTFNIVrBTMOBSUIAyDYFMBQVdheDUEgVdYyMDAyQ%2BiI0sAwA%3D
2021-05-17 07:09:48
Orange https://jxl-art.surma.technology/?zcode=i4h04uLKTFNIVrBTMOBSUIAyDYFMBQVdheDUEgVdE1MDAyS%2BoRmYi8QBAA%3D%3D
veluca
2021-05-17 07:10:12
that's some rather extreme values πŸ˜„
2021-05-17 07:10:57
X = green-red, Y = ~luminance, B = blue-yellow (at least with the definition we use in modular mode)
jjido
2021-05-17 07:14:43
What bitdepth in modular mode?
veluca
2021-05-17 07:33:41
default 8
2021-05-17 07:33:46
but you can change it
2021-05-17 07:34:09
not that it matters much for xyb
Petr
Lastrosade hey hey ppl, I have an issue where cjxl won't read files that have filenames with japanese characters in them
2021-05-17 08:27:19
Not only Windows, not only Japanese chars, not only cjxl. 😒 I opened a similar issue a while ago (https://gitlab.com/wg1/jpeg-xl/-/issues/184). If possible, it might be a good idea to handle this uniformly (i.e. by a single reusable piece of code) throughout libjxl.
2021-05-17 08:47:08
When I tested it back then, it worked without any diacritics in the path/filename and didn't work with 1 or more diacritics in the path/filename.
Deleted User
2021-05-17 03:23:47
Can anyone try compressing this Wikipedia GIF and *not* get JXL larger than the original?
improver
2021-05-17 03:24:41
I suspect this one benefits from global palette a lot
monad
Can anyone try compressing this Wikipedia GIF and *not* get JXL larger than the original?
2021-05-17 03:39:01
Where is the original? The linked image seems to be ~7MB which is easily compressed (cjxl defaults produce ~450KB).
Deleted User
monad Where is the original? The linked image seems to be ~7MB which is easily compressed (cjxl defaults produce ~450KB).
2021-05-17 03:40:41
6.65 MB exactly? This IS the original image.
monad
2021-05-17 03:43:22
This is what I'm seeing: ```6979753 DRAKON_algorithm_animation.gif 171356 'DRAKON_algorithm_animation (gifsicle).gif' 2299407 'DRAKON_algorithm_animation (cjxl default).jxl'```
2021-05-17 03:44:28
Don't know how to actually view the jxl to verify though.
improver
2021-05-17 03:45:37
``` 6.7M DRAKON_algorithm_animation.gif 2.3M DRAKON_algorithm_animation.gif.jxl ``` but this is only when i pass `--patches=0` otherwise it blows up
2021-05-17 03:46:10
blows up as in ``` 6.7M DRAKON_algorithm_animation.gif 25M DRAKON_algorithm_animation.gif.jxl ```
monad
monad Where is the original? The linked image seems to be ~7MB which is easily compressed (cjxl defaults produce ~450KB).
2021-05-17 03:47:14
(and this ~450KB I saw was due to latency in the file explorer, oops)
improver
2021-05-17 03:47:37
like damn patches regresses on this one a lot
BlueSwordM
Can anyone try compressing this Wikipedia GIF and *not* get JXL larger than the original?
2021-05-17 03:47:40
Lossy or lossless?
Deleted User
BlueSwordM Lossy or lossless?
2021-05-17 03:47:58
Can animations be lossily compressed?
BlueSwordM
2021-05-17 03:48:04
Yes.
improver
2021-05-17 03:48:31
it picks lossless when encoding from gif anyway so you'd need manual quality setting to do something else
Deleted User
BlueSwordM Yes.
2021-05-17 03:49:59
Ah, I forgot about lossy Modular. Can animations be done with VarDCT tho?
_wb_
2021-05-17 03:50:36
Yes
monad
improver blows up as in ``` 6.7M DRAKON_algorithm_animation.gif 25M DRAKON_algorithm_animation.gif.jxl ```
2021-05-17 03:50:37
I'm still using the previous published version, not latest version with modular patches fix.
_wb_
2021-05-17 03:51:13
Animations can be done with vardct, probably not a good idea on that specific one though
Deleted User
monad I'm still using the previous published version, not latest version with modular patches fix.
2021-05-17 03:51:48
I'm using `30ea86ab` commit on Windows and I'm compiling fresh copy from GitLab on WSL just to be sure.
_wb_
2021-05-17 03:52:07
We completely suck at doing anything close to optimal for animations though, atm
BlueSwordM
improver blows up as in ``` 6.7M DRAKON_algorithm_animation.gif 25M DRAKON_algorithm_animation.gif.jxl ```
2021-05-17 03:52:16
Same here(Git though).
2021-05-17 03:52:27
It blows up the file size and makes it absurdly slow to decode for some reason.
improver
2021-05-17 03:53:22
(yes im using git version)
Deleted User
monad This is what I'm seeing: ```6979753 DRAKON_algorithm_animation.gif 171356 'DRAKON_algorithm_animation (gifsicle).gif' 2299407 'DRAKON_algorithm_animation (cjxl default).jxl'```
2021-05-17 03:54:14
How did you achieve that? Running `cjxl` from Scope's `jpeg-xl-30ea86ab-mingw64` resulted in: ``` 6Β 979Β 753 DRAKON_algorithm_animation.gif 25Β 981Β 338 DRAKON_algorithm_animation.jxl```
improver
2021-05-17 03:54:43
that's basically the same as what i got
Deleted User
2021-05-17 03:54:58
Wait, I have to **dis**able patches, not ~~en~~able them?
BlueSwordM
2021-05-17 03:55:05
Yes.
improver
2021-05-17 03:55:12
correct.
2021-05-17 03:55:36
they used to "not work" and now they were "fixed"
_wb_
2021-05-17 03:57:50
Hah
improver
2021-05-17 03:58:11
but well heuristics regarding when to use them weren't really tuned because they didn't work so now we have this
Deleted User
monad This is what I'm seeing: ```6979753 DRAKON_algorithm_animation.gif 171356 'DRAKON_algorithm_animation (gifsicle).gif' 2299407 'DRAKON_algorithm_animation (cjxl default).jxl'```
2021-05-17 03:58:46
Seems like I'm getting the same results with patches __**dis**__abled. ```6Β 979Β 753 DRAKON_algorithm_animation.gif 2Β 299Β 407 DRAKON_algorithm_animation.jxl```
improver
2021-05-17 03:59:47
i guess this will b fixed sometime hopefuly before 0.4.0 is Really Out
monad
2021-05-17 04:00:35
I used commit `ab7c5e9b` specifically, with broken patches.
Deleted User
2021-05-17 04:01:46
Patches enabled, commit `30ea86ab`: ``` J P E G \/ | /\ |_ e n c o d e r [v0.3.7 | SIMD supported: SSE4,Scalar] Read 1295x650 image, 29.1 MP/s Encoding [Modular, lossless, squirrel], 2 threads. Compressed to 25981338 bytes (0.700 bpp/frame). 1295 x 650, 0.00 MP/s [0.00, 0.00], 1 reps, 2 threads. Average butteraugli iters: 0.00 Total layer bits headers 0.070701% 15959 Total layer bits TOC 0.405333% 91494 Total layer bits quant tables 0.001564% 353 Total layer bits dictionary 15.153036% 3420425 [c/i:2219.00 | hst: 14367 | ex: 217960 | h+c+e: 463620.675] Total layer bits modularGlobal 3.395613% 766476 [c/i:7964.00 | hst: 85528 | ex: 1985 | h+c+e: 2294518.688] Total layer bits modularAcGroup 80.031472% 18065136 Total layer bits modularTree 0.942282% 212697 [c/i:706.00 | hst: 3745 | ex: 7009 | h+c+e: 27197.093] Total image size 22572540 [c/i:10889.00 | hst: 103640 | ex: 228882 | h+c+e: 2787263.456] Allocations: 154193 (max bytes in use: 3.677174E+09)```
2021-05-17 04:01:47
Patches disabled, commit `30ea86ab`: ``` J P E G \/ | /\ |_ e n c o d e r [v0.3.7 | SIMD supported: SSE4,Scalar] Read 1295x650 image, 39.2 MP/s Encoding [Modular, lossless, squirrel], 2 threads. Compressed to 2299407 bytes (0.062 bpp/frame). 1295 x 650, 0.01 MP/s [0.01, 0.01], 1 reps, 2 threads. Average butteraugli iters: 0.00 Total layer bits headers 0.079262% 14547 Total layer bits TOC 0.505825% 92834 Total layer bits quant tables 0.001923% 353 Total layer bits modularGlobal 2.753854% 505415 [c/i:5856.00 | hst: 54528 | ex: 1677 | h+c+e: 2219671.762] Total layer bits modularAcGroup 95.769831% 17576641 Total layer bits modularTree 0.889304% 163214 [c/i:531.00 | hst: 2866 | ex: 5272 | h+c+e: 20325.481] Total image size 18353004 [c/i:6387.00 | hst: 57395 | ex: 8146 | h+c+e: 2241194.368] Allocations: 48555 (max bytes in use: 3.654380E+09)```
improver
2021-05-17 04:02:30
it's not like they were broken but it simply didn't detect them, like, at all. and only in modular mode so in stuff like lossy screenshot demos they did work
_wb_
2021-05-17 04:11:11
Quite a dramatic example of patches doing something very unproductive. <@179701849576833024> you may want to add this one to your tuning set πŸ˜…
Deleted User
2021-05-17 04:13:25
Licensing info: https://en.wikipedia.org/wiki/File:DRAKON_algorithm_animation.gif
veluca
2021-05-17 04:15:35
I have no idea what the encoder will do with patches on an animation...
Deleted User
2021-05-17 04:46:00
Looking at this GIF I wonder: Does JXL allow to use animations together with layers? For example (if you had the original image project), could you animate only the arrows and boxes and have an always visible, static text layer above?
Looking at this GIF I wonder: Does JXL allow to use animations together with layers? For example (if you had the original image project), could you animate only the arrows and boxes and have an always visible, static text layer above?
2021-05-17 04:48:15
Probably yes. https://discord.com/channels/794206087879852103/822105409312653333/843892030576001094
2021-05-17 04:51:29
<@!794205442175402004> Does a single page JXL have any duration?
_wb_
Looking at this GIF I wonder: Does JXL allow to use animations together with layers? For example (if you had the original image project), could you animate only the arrows and boxes and have an always visible, static text layer above?
2021-05-17 04:51:48
Weird things can be done, but the encoder isn't doing it atm
Deleted User
2021-05-17 04:52:39
But the decoder would support it?
_wb_
<@!794205442175402004> Does a single page JXL have any duration?
2021-05-17 04:53:18
Jxl knows only frames, not pages. Either the global header says frames have no duration (and then they are implicitly 0-duration), or they can have a duration, which can be zero or nonzero
2021-05-17 04:54:31
Conceptually you have an animation of nonzero-duration frames that consist of one frame or a series of zero-duration frames followed by a nonzero-duration frame.
2021-05-17 04:55:35
So you cannot quite have animation happening in a bottom layer while a top layer gets applied to all animation frames - the layering is lower level than the animation framing, if you get what I mean
2021-05-17 04:56:14
But you can effectively do the same thing by just patch-blending the top layer over every animation frame
Deleted User
2021-05-17 04:58:55
Ok, let's keep using SVGs for such graphics then. πŸ˜„
2021-05-17 05:01:12
https://discord.com/channels/794206087879852103/822105409312653333/843894370197307413
2021-05-17 05:01:43
It's too late to change the spec, but if we could, I'd add pages
2021-05-17 05:01:59
They'd be like "folders"
2021-05-17 05:03:21
One page could be static single-layer image, second page could be animated, third page could be multi-layer static image and fourth page could be another animation
2021-05-17 05:03:48
I wish JPEG XL could have that standardized
2021-05-17 05:03:58
Pages as folders for frames
2021-05-17 05:05:51
And a page should also be allowed to be a website or a video. <:kekw:808717074305122316>
_wb_
2021-05-17 05:07:08
Pages with animation on them is interesting, but adds another complication to applications that want to support jxl
2021-05-17 05:07:41
Maybe when jxl becomes a payload codec for PDF, you can get what you want
improver
2021-05-17 05:07:49
not that much bigger complication than just pages
_wb_
2021-05-17 05:07:59
PDF can have pages with vector stuff, video codecs, etc
improver
2021-05-17 05:08:36
tfw we'll be shoting pics to jxl pdfs
Deleted User
2021-05-17 05:09:27
Or, to keep things simple and closer to the current spec, if the JXL file contains just the zero-duration frames, there could be a special tag added to the file that'd say "treat all frames as independent pages to flick between".
improver
2021-05-17 05:10:25
that would be sorta clean but would also break multilayer images
2021-05-17 05:12:17
maybe you wont be shoting multilayer but there can be use cases for some quite advanced encoders, or applied effects
2021-05-17 05:12:41
like different layer for recognised faces
Deleted User
2021-05-17 05:15:03
That "multi-page" tag should be backwards compatible. Viewers that don't understand the tag would show just the first page. Lack of it in a file would mean current situation: it's a single image with multiple layers that have to be coalesced before viewing.
monad
2021-05-17 05:16:09
I think neknekk is referring to multi-layer images in a "page".
improver
2021-05-17 05:16:12
interpreting zero-duration as anything else than multilayer image is not backwards compatible at all
monad
2021-05-17 05:16:35
As in, they wouldn't work with that implementation.
improver
2021-05-17 05:16:36
but interpreting really-large duration as that could work
2021-05-17 05:17:32
i mean have really-large durations, and box hinting that these really-large durations are page markers
Deleted User
monad I think neknekk is referring to multi-layer images in a "page".
2021-05-17 05:17:44
Unfortunately with my "multi-page" tag every layer would have to be treated as a separate page and thus multi-layer pages would be impossible.
_wb_
2021-05-17 05:22:38
Could just reserve the largest duration (which is I think 2^32-1 ticks or something, where the tick duration can be chosen in the global header) as a page separator
2021-05-17 05:23:06
Then if a viewer doesn't know about it, it will just stay on page 1 until the sun explodes
2021-05-17 05:23:36
But you can still have pages containing layers or animations
Deleted User
2021-05-17 05:25:50
That could actually work either
improver
2021-05-17 05:26:41
I'm a bit surprised something like largest int or whole upper area wouldn't be reserved for further extensions
2021-05-17 05:27:07
no one would encode with these insane durations anyway. hopefully.
monad
2021-05-17 05:29:01
Sure it will be done, for art, of course.
improver
2021-05-17 05:30:57
to hide sekrit images in other images
monad
2021-05-17 05:31:46
^ classic tiff usage
_wb_
2021-05-17 05:32:13
Viewers would just have buttons to skip to next frame or go back to previous frame, conceptually there are no real pages, just an insanely long animation where seeking is a nice viewer feature πŸ˜…
monad
2021-05-17 05:39:00
Is there currently a general-purpose image viewer that supports animation with controls for play/pause and frame seeking? I've wanted that for GIFs before.
Deleted User
2021-05-17 05:40:34
XnView MP
Nova Aurora
2021-05-17 05:41:56
MPV <:kekw:808717074305122316>
BlueSwordM
Nova Aurora MPV <:kekw:808717074305122316>
2021-05-17 05:42:24
I want JPEG-XL support within ffmpeg and mpv and VLC <:megapog:816773962884972565>
monad
2021-05-17 05:43:59
I only tried XnView MP after joining this server, didn't notice this feature. =o
Nova Aurora
BlueSwordM I want JPEG-XL support within ffmpeg and mpv and VLC <:megapog:816773962884972565>
2021-05-17 05:45:19
> I want JPEG-XL support within ~~ffmpeg and mpv and VLC~~ Everything <:Poggers:805392625934663710>
2021-05-17 05:46:58
I don't care if your app is a calculator, JXL support <:kekw:808717074305122316>
2021-05-17 05:47:57
I would've said a text editor, but VSCode will get JXL support through chromium eventually <:megapog:816773962884972565>
monad
2021-05-17 05:48:38
Same with Atom.
_wb_
2021-05-17 06:01:44
`cat foo.jxl` could at least give a nice colored ascii art rendering, file a bug report! πŸ˜‚
monad
2021-05-17 06:07:07
Among your web adoption efforts, have y'all been in contact with Lynx browser devs?
Nova Aurora
2021-05-17 06:11:26
I don't think anyone has yet... I think Chroumium and Gecko are the two most important with apple adopting whenever the benevolent gods decide to
jjido
Can anyone try compressing this Wikipedia GIF and *not* get JXL larger than the original?
2021-05-17 08:37:44
Drakon! So cool! πŸ˜† 😻
BlueSwordM
2021-05-18 05:25:47
Actually, that'd be really nice.
2021-05-18 05:26:08
Including an option for settings metadata retention would be quite useful.
_wb_
2021-05-18 05:27:08
Guess the same thing could be done as what imagemagick does in jpeg: just attach some metadata blob with the encode settings.
2021-05-18 05:28:15
It doesn't really mean much unless you also specify the exact encoder version etc
2021-05-18 05:52:12
There is nothing about that in the jpeg spec
2021-05-18 05:52:29
ImageMagick does some estimation of quality based on the quant tables
2021-05-18 05:52:51
And I think it records what it did itself via metadata comments, not sure though
2021-05-18 05:53:39
Such info can always be omitted or wrong
2021-05-18 05:54:58
And even if it's right, it doesn't necessarily mean anything - you can do a d8 encode, then decode to pixels, then do a d0.5 encode and it will look like it's a high quality encode but of course it isn't.
2021-05-18 05:57:36
In general, there's an ad hoc group of JPEG (called "JPEG fake media") currently working on content authenticity / keeping track of what happened to an image since capturing. If that leads to anything, it will be a new metadata standard that could be used also in jxl.
2021-05-18 06:00:44
For authoring workflows, only lossless can really be trusted. Lossy compression is not idempotent, there will always be some generation loss.
improver
2021-05-18 08:33:06
btw can jxl do that flif's progressive animation decoding thingy (<https://flif.info/animation.html>)?
_wb_
2021-05-18 08:34:30
Nope
2021-05-18 08:34:49
That was cool, but also not very good for performance
2021-05-18 08:36:52
If animations are big, you should do video (possibly several ones for various bandwidth conditions)
! grim
2021-05-19 07:21:57
hi
_wb_
2021-05-19 07:23:34
welcome!
Zelo101
2021-05-19 08:10:09
is there a way to get chrome to view .jxl files instead of downloading them?
2021-05-19 08:10:46
jpeg xl is enabled in the flags page btw
improver
2021-05-19 08:11:05
correct mime type maybe
_wb_
2021-05-19 08:15:28
Put it in an img tag
Petr
2021-05-20 07:36:04
Is there any specific date considered a birth date of jxl? Just in case we want to celebrate… πŸ˜‰
Diamondragon
2021-05-20 07:53:55
The bitstream was frozen on the 24th of December. Seems as good a birthday as any. That was when libjxl 0.2 was released, also.
2021-05-20 07:56:11
Alternatively, we might say it isn't born yet, and we wait for the final vote on the FDIS.
_wb_
2021-05-20 07:57:12
Birth dates of codecs are a bit hard to pinpoint, but I would say the January 2021 JPEG meeting that approved/finalized the spec is a good candidate.
Petr
2021-05-20 07:59:12
If we are (or want to be) real party animals, we can celebrate both the format and the library birthdays. πŸ™‚
Troc
2021-05-20 08:41:40
πŸ˜“ JXL enbcoding is rather heavy.
2021-05-20 08:45:00
veluca
2021-05-20 08:45:33
cjpegxl? that has not been the exe name for quite a while...
Troc
2021-05-20 08:50:13
It could be that Megapixel hasn't been updated in some time.
veluca
2021-05-20 09:07:56
very likely
2021-05-20 09:08:16
what are you compressing? I mean, with what settings?
Troc
2021-05-20 09:09:46
Slowest setting, quality 90.
2021-05-20 09:09:51
Comic books.
2021-05-20 09:10:11
6000x4000 pixels thereabouts
veluca
2021-05-20 09:14:38
it shouldn't use *so much* ram, I suppose it's doing modular mode and it's from before the improvements to memory usage...
Troc
2021-05-20 09:17:18
How should I use JXL encoding then?
2021-05-20 09:17:33
Please do share.
veluca
2021-05-20 09:18:19
well, I guess using a newer version might help, if you have a binary available πŸ™‚
2021-05-20 09:18:39
are you running this from the command line yourself?
2021-05-20 09:19:32
anyway, with the newest versions you can do `cjxl input.png output.jxl` and it should "just work" and make a visually-lossless image, and if you want full lossless you can do `cjxl -m input.png output.jxl`
Troc
2021-05-20 09:19:33
I'm using MegaPixel QT
Scope
2021-05-20 09:19:36
I think this RAM consumption is because it is the slowest speed (which is not very useful for lossy), older version, high resolution and encoding many images in parallel
Troc
2021-05-20 09:20:24
Slowest speed should result in smallest files.
veluca
2021-05-20 09:20:48
for lossless mode, yes
Scope
2021-05-20 09:21:15
For lossy and current implementation in JXL, more often No than Yes
veluca
2021-05-20 09:21:44
for lossy, I'm not sure I would really trust `-s 8` and `-s 9` to be better than `-s 7` (for sure not so much better that it's worth the compute imho...)
2021-05-20 09:21:52
especially in older versions
Troc
2021-05-20 09:22:31
Why wouldn't you trust them?
Crixis
Troc Why wouldn't you trust them?
2021-05-20 09:23:33
vardct is perceptualy optimized and need a lot of test, the mor tested speed now is the default
Scope
2021-05-20 09:23:35
Probably because they haven't been very tuned and optimized yet
fab
2021-05-20 09:23:35
for %i in (C:\Users\User\Documents\bn2*.jpg) do cjxl -j -s 6 -q 63.52 --epf=2 -p --gaborish=1 --patches=0 --dots=1 --use_new_heuristics %i %i.jxl
2021-05-20 09:23:43
still defends well against webp
veluca
2021-05-20 09:23:45
because we don't test them nearly as much as we test everything else πŸ˜„
fab
2021-05-20 09:23:50
but if you want webp2 quality
2021-05-20 09:23:53
or better
2021-05-20 09:24:01
it needs better configuration
Troc
2021-05-20 09:24:03
Also, where should I look for the latest jxl executable to run in CMD? Could I use batch mode in commandline?
veluca
2021-05-20 09:24:18
well, actually - we only ever really test `-s 7` and sometimes `-s 6` for lossy
fab
2021-05-20 09:24:20
like more scaling of the quality
2021-05-20 09:24:25
of quantizer
Troc
2021-05-20 09:24:54
The JXL encoder that comes with this Megapixel software is dated to 16th of February this year.
veluca
2021-05-20 09:24:54
as where to find the executable, I don't really know as I don't use windows myself (and I am a dev anyway, so I compile it from source)
Crixis
Troc Why wouldn't you trust them?
2021-05-20 09:24:56
the better option now is `cjxl -q (what you want) input output` for lossy
veluca
2021-05-20 09:25:05
for command line, yes, you can absolutely
fab
2021-05-20 09:25:19
for screenshot wp2 is also improving
Crixis
2021-05-20 09:25:23
and `cjxl -q 100 input output` for lossless
fab
2021-05-20 09:25:24
for %i in (C:\Users\User\Documents\bn2*.jpg) do cjxl -j -s 6 -q 63.52 --epf=2 -p --gaborish=1 --patches=0 --dots=1 --use_new_heuristics %i %i.jxl
2021-05-20 09:25:32
has a similar quality to webp screenshot
Troc
2021-05-20 09:25:39
Why would you not optimize the edge values to the max?
fab
2021-05-20 09:25:40
but on some images is better
2021-05-20 09:25:49
with 12052021 build
2021-05-20 09:26:00
with anime use d 1
2021-05-20 09:26:03
at s 9
Troc
2021-05-20 09:26:05
Realistically most people will use the default value or get max speed or max efficiency.
2021-05-20 09:26:15
By which I mean lowest file size.
fab
2021-05-20 09:26:25
yes but if it can't be scaled
Crixis
Troc Why would you not optimize the edge values to the max?
2021-05-20 09:26:27
default speed is now more optimized but not in future
Scope
2021-05-20 09:26:36
For the latest builds for Windows <#822120855449894942>
fab
2021-05-20 09:26:39
like if it can't get consistent quality at the q you want
2021-05-20 09:27:02
like if it compares to webp only with a quality
2021-05-20 09:27:07
is not good
2021-05-20 09:27:15
that means the encoder is still test
2021-05-20 09:27:35
like q is supposed to get higher quality
veluca
2021-05-20 09:27:39
at some point we'll also tune slower speeds
fab
2021-05-20 09:27:50
but new heuristics usually if you use higher q is worse
Troc
2021-05-20 09:27:55
I can run slower speeds for you.
fab
2021-05-20 09:28:04
way worse
veluca
2021-05-20 09:28:18
ah, running them is not the problem - the problem is doing the manual quality comparison, that takes a long while...
Crixis
Troc I can run slower speeds for you.
2021-05-20 09:28:41
`cjxl -q (what you want) -s 9 input output` for lower speed
Troc
2021-05-20 09:28:42
The reason I'm interested in JXL in the first place is to get the exact same looking picture to my standards with the smallest possible filesize.
veluca
2021-05-20 09:29:21
it's more complicated than that xD
Scope
2021-05-20 09:29:22
-m (modular mode)
veluca
2021-05-20 09:29:40
-m enables modular mode, and modular mode defaults to lossless. -q 100 and -d 0 also enable lossless
Crixis
Troc The reason I'm interested in JXL in the first place is to get the exact same looking picture to my standards with the smallest possible filesize.
2021-05-20 09:29:46
for lossless `cjxl -q 100 -s 9 -E 3 -I 1 input output` for minimum speed
2021-05-20 09:30:07
if you are not enconding jpeg
fab
2021-05-20 09:30:28
jpeg xl preserves more gradient but it can undersaturate or the image can look more like jfif
Troc
2021-05-20 09:30:38
Does Speed 9 result in a smaller file than the smaller numbers?
Crixis
Troc Does Speed 9 result in a smaller file than the smaller numbers?
2021-05-20 09:30:51
on lossless yes
2021-05-20 09:30:57
on lossy likely
Troc
2021-05-20 09:31:05
So in say, quality 90, I'd have to test.
fab
2021-05-20 09:31:17
jpeg xl is still derived from jfif
Troc
2021-05-20 09:31:19
Thanks, Mai.
Crixis
Troc So in say, quality 90, I'd have to test.
2021-05-20 09:31:22
is safer -s 7 (standard)
Scope
2021-05-20 09:31:24
For lossy, the smaller size is relative
fab
2021-05-20 09:31:30
if you look at jfif images and the one of the new heuristics command
2021-05-20 09:31:33
they look similar
veluca
2021-05-20 09:31:35
the thing is, for lossy the situation is more complicated than that - there's not just the "size" axis
fab
2021-05-20 09:31:40
jpeg xl has only more precision
Troc
2021-05-20 09:31:44
No, smaller size is actually absolute. The picture is smaller or it isn't.
2021-05-20 09:31:51
What changes is quality.
2021-05-20 09:31:56
And encoding speed.
fab
2021-05-20 09:32:06
there isn't a big difference
2021-05-20 09:32:25
at least you can get more with synthetic images
Scope
2021-05-20 09:32:36
Quality cannot be measured with absolute precision
fab
2021-05-20 09:32:42
but if you want more quality you haven't options
2021-05-20 09:32:51
than waiting devs to make another version
lithium
2021-05-20 09:32:52
I'm suggest use -d(target distance) on cjxl vardct mode. ```the human visual system is highly non-linear```
Crixis
2021-05-20 09:32:54
in lossy -s > 7 is not quality wise now
2021-05-20 09:33:35
-d 1 <=> -q 90
Troc
2021-05-20 09:33:49
Alright.
2021-05-20 09:34:17
I've found that lossless doesn't make much sense at all and can often even make pictures larger, which is counterintuitive to my needs.
fab
2021-05-20 09:34:17
jpeg xl has the slowness of jfif
2021-05-20 09:34:26
and other bad aspects of jfif
Troc
2021-05-20 09:34:40
I'm just glad that it can be viewed.
fab
2021-05-20 09:34:43
wp2 seems better to average web dev
2021-05-20 09:34:49
as is more simple
2021-05-20 09:34:54
the encoder change less
2021-05-20 09:35:03
because it deals with one type of image
2021-05-20 09:35:09
not with 3 type of images
2021-05-20 09:35:21
but it has resolution limits
2021-05-20 09:35:33
and also is not standardized and finished yet
Crixis
Troc I've found that lossless doesn't make much sense at all and can often even make pictures larger, which is counterintuitive to my needs.
2021-05-20 09:35:42
from jpeg yes
Scope
2021-05-20 09:35:51
In my experience I would not recommend using a speed higher than -s 7 (sometimes -s 8) for lossy quality, because with much longer encoding time and RAM consumption the results can be worse
fab
2021-05-20 09:35:58
av1enc also at q 81.9 looks great
Crixis
2021-05-20 09:36:02
for jpeg you must use lossless transcoding
2021-05-20 09:37:03
`cjxl input.jpg output`
2021-05-20 09:37:13
is always smaller
Troc
2021-05-20 09:37:37
I must use lossless?
lithium
2021-05-20 09:38:01
-d is butteraugli target distance, just target not promise, On non-photographic content you should very carefully.
Crixis
2021-05-20 09:38:04
on not very high quality jpgs yes
fab
2021-05-20 09:38:32
the command with new heuristic is fair good
2021-05-20 09:38:41
the problem is you lose amount of quality
Troc
2021-05-20 09:38:59
You're right.
fab
2021-05-20 09:39:03
like a webp2 with
2021-05-20 09:39:04
-q 61.738 -effort 5 -sns 84 -diffusion 65 -ps 0 -tile_shape 3
2021-05-20 09:39:12
can look even better sometimes
Troc
2021-05-20 09:39:12
Also on the commandline, this is instant.
fab
2021-05-20 09:39:19
than a jpeg xl with new heuristics
Troc
2021-05-20 09:39:19
I'm impressed.
fab
2021-05-20 09:39:32
not on saturation because you'll need higher value for that with wp2
Troc
2021-05-20 09:39:39
However the lossless output was only 9.5% smaller.
fab
2021-05-20 09:39:47
distortion are good unless you don't re ecncode too much
Crixis
Troc However the lossless output was only 9.5% smaller.
2021-05-20 09:40:02
if you whant go lower on jpegs
fab
2021-05-20 09:40:03
so is advised to use lossless jpg transcode
Troc
2021-05-20 09:40:14
I wish I had a imgsli.type tool to zoom in and compare pictures on desktop.
fab
2021-05-20 09:40:33
because jpg are yet with loss so the encoding will be less good and efficient
Crixis
2021-05-20 09:40:47
`cjxl -j -q something input output`
2021-05-20 09:40:59
but jpg is not a good source
2021-05-20 09:41:27
becouse it as a lot of artifacts
Troc
2021-05-20 09:41:34
So I should output to PNG from my upscaling software?
2021-05-20 09:41:47
Not a problem.
Scope
2021-05-20 09:42:16
Switching/Flip comparisons in any viewer are much more accurate than slide comparisons
Crixis
2021-05-20 09:42:30
the problem is the source not the format, jpg have a lot of atifact in pixels
Troc
2021-05-20 09:42:59
Comparison tool that maintains the position I have in two pictures and also accepts jxl would be nice.
Crixis
2021-05-20 09:43:00
lossless transcode take the dct directly
Troc
2021-05-20 09:43:21
Alternatively I could re-transcode the jxl back to PNG lossless and compare that.
Crixis
Troc Comparison tool that maintains the position I have in two pictures and also accepts jxl would be nice.
2021-05-20 09:44:34
https://squoosh.app help?
Troc
2021-05-20 09:45:35
BRO
2021-05-20 09:45:39
Thank you very much!
Crixis
2021-05-20 09:45:49
nothing
Troc
2021-05-20 09:47:28
Wait, I can't upload two pictures.
2021-05-20 09:47:50
I'll have to rely that their compression thing is accurate.
Scope
2021-05-20 09:48:33
Web applications are more limited and slower than native ones
Troc
2021-05-20 09:48:47
Their JPEG XL filter also only goes up to Speed 6.
Crixis
2021-05-20 09:49:00
depend on your pc
Troc Their JPEG XL filter also only goes up to Speed 6.
2021-05-20 09:49:30
their 6 is -s 9
2021-05-20 09:49:39
they use cjxl
Troc
2021-05-20 09:49:49
This is dumb.
Scope
2021-05-20 09:49:53
Yes, this is an effort, not a speed, it has other values (although I do not remember how they relate)
Troc
2021-05-20 09:50:16
6 and 9 don't relate to each other in full numbers.
Crixis
2021-05-20 09:50:19
cjxl -s is a sort dumb also
_wb_
2021-05-20 09:50:27
soon it will be called --effort
2021-05-20 09:50:40
soon being at next sync
Troc
2021-05-20 09:50:42
At least both are divisible by three.
Crixis
2021-05-20 09:51:11
squoosh is cjxl -s -3
Troc
2021-05-20 09:51:28
Oh, it crashed.
_wb_
2021-05-20 09:51:54
--speed will still work, just the simple help screen will show --effort and you will need to do -v -v -h to see that it still exists
Troc
2021-05-20 09:51:55
I'd much prefer being able to upload two pictures I've made myself, but that's not how this app works.
2021-05-20 09:52:27
I have a 4K monitor but zooming in to 6000x4000 images one after another gets confusing.
Crixis
Troc I'd much prefer being able to upload two pictures I've made myself, but that's not how this app works.
2021-05-20 09:53:07
you must go png with djxl input.jxl output.png
2021-05-20 09:53:17
and use a standard image diff
fab
2021-05-20 09:53:28
for %i in (C:\Users\User\Documents\bil*.jpg) do cjxl -j -q 98.36 -s 7 --progressive --faster_decoding=1 --use_new_heuristics --epf=2 %i %i.jxl
2021-05-20 09:53:40
try this if you want fake sharpness
Troc
2021-05-20 09:54:12
What's new heuristics?
fab
2021-05-20 09:54:21
2021-05-20 09:54:21
this is 06052021
Troc
2021-05-20 09:54:32
That tells me nothing.
Crixis
Troc What's new heuristics?
2021-05-20 09:54:43
a new mode to encode but now is only a bad choice
Troc
2021-05-20 09:54:54
Why would Fabian recommend it then?
fab
2021-05-20 09:54:54
this is not new
Troc
2021-05-20 09:54:59
It's not new?
Crixis
Troc Why would Fabian recommend it then?
2021-05-20 09:55:14
fabian test a lot of strange mode
fab
2021-05-20 09:55:15
i made some photos sharper with that settings
2021-05-20 09:55:20
only with cmd works
2021-05-20 09:55:23
not in squoosh.app
Crixis
2021-05-20 09:55:27
but new heuristics is not ready
fab
2021-05-20 09:55:48
ookk
2021-05-20 09:56:04
if you want 12052021
2021-05-20 09:56:14
and you have like images of jxl art in png
2021-05-20 09:56:21
to compress or to beautify
2021-05-20 09:56:24
you can try
2021-05-20 09:56:25
for %i in (C:\Users\User\Documents\bn2*.jpg) do cjxl -j -s 6 -q 63.52 --epf=2 -p --gaborish=1 --patches=0 --dots=1 --use_new_heuristics %i %i.jxl
Troc
2021-05-20 09:56:28
I feel like a moron. After testing, you were right and the difference between speed 8 and speed 9 was 100 kilobytes.
fab
2021-05-20 09:56:41
new heuristics works well with synthetic image
Scope
2021-05-20 09:56:54
New heuristics is not working correctly yet
fab
2021-05-20 09:57:04
in fact is like jfif test mode
2021-05-20 09:57:19
pieter wuille
2021-05-20 09:57:25
and jon older flif
Crixis
Troc I feel like a moron. After testing, you were right and the difference between speed 8 and speed 9 was 100 kilobytes.
2021-05-20 09:57:33
in lossless the save can be a lot
2021-05-20 09:57:51
and -s >7 are ready in lossless
fab
2021-05-20 09:58:06
s7 lossless don't save anything
2021-05-20 09:58:13
is too fast fast as decoding
2021-05-20 09:58:16
only x4 slower
Troc
2021-05-20 09:58:16
However between 7 and 8 was 2 MB, which is 20 times as much and overall a 5.6% larger filesize.
fab
2021-05-20 09:58:38
or use s 7 q 90
Crixis
Troc However between 7 and 8 was 2 MB, which is 20 times as much and overall a 5.6% larger filesize.
2021-05-20 09:58:58
if you want lower dim in lossy just go -q <90
fab
2021-05-20 09:59:00
with no -m options
2021-05-20 09:59:20
do not write -m in custom commands
2021-05-20 09:59:31
(it means modular encoding)
2021-05-20 09:59:40
just set speed 7 quality 90
2021-05-20 10:00:02
but i think if you should wait for next sync
2021-05-20 10:00:15
is probably better
Crixis
Troc However between 7 and 8 was 2 MB, which is 20 times as much and overall a 5.6% larger filesize.
2021-05-20 10:00:26
sometime -s 7 -q 85 is better quality and smaller then -s 8 -q 90
2021-05-20 10:00:53
in future this will be fixed
2021-05-20 10:01:37
as veluca said is somehow better use -d than -q
2021-05-20 10:02:32
high quality -d 0.5 medium-high -d 1 (standard) medium-low -d 2 low -d 4
2021-05-20 10:02:40
-d 0 is lossless
2021-05-20 10:03:12
very-f***-low -d 6
Scope
2021-05-20 10:03:20
For lossless or Jpeg lossless transcoding - slower speeds are more efficient, but for lossy it is incorrect to compare only size, because quality is not some constant value (even according to some metric)
veluca
Scope New heuristics is not working correctly yet
2021-05-20 10:08:14
please don't use the new heuristics, I wrote them and that flag exists only for me to try them out, they are not even close to being ready and working well
Scope
2021-05-20 10:09:15
At least no one uses it except Fabian
Crixis
2021-05-20 10:09:40
fabian has the new heuristics pass?
fab
2021-05-20 10:19:58
Jxl usually compress images in a similar Way through the image
2021-05-20 10:20:22
It doesnt do particular blur
2021-05-20 10:20:51
And if You up quality you notice the compression is worse
Troc
2021-05-20 10:21:06
Fabian, why do you use this new heuristics thing?
fab
2021-05-20 10:21:51
At that extreme settings the effect was good
diskorduser
2021-05-20 10:21:56
Because he is an undercover jxl developer.
fab
2021-05-20 10:22:04
Q 63.52
2021-05-20 10:22:43
But you cant change quality without making it worse
Troc
2021-05-20 10:25:12
How do I specify a folder input in commandline?
improver
2021-05-20 10:25:40
you don't
Troc
2021-05-20 10:25:50
So it's single picture only.
improver
2021-05-20 10:26:05
will need something like loop in shell
Troc
2021-05-20 10:26:15
Doesn't meet my needs in that case.
improver
2021-05-20 10:26:24
script invoking it would
fab
2021-05-20 10:26:25
Just copy the command
2021-05-20 10:26:41
But use only s 9 q 90
Troc
fab Just copy the command
2021-05-20 10:26:42
For 125 pictures?
2021-05-20 10:27:00
-_-
fab
2021-05-20 10:27:06
I think it hasnt limit on Windows 7 or 10
improver
2021-05-20 10:27:08
<https://stackoverflow.com/questions/138497/iterate-all-files-in-a-directory-using-a-for-loop>
fab
2021-05-20 10:27:23
Ask someone in this server
Scope
2021-05-20 10:28:17
Benchmark_xl can do that, but for Windows it doesn't work with keys like *.png, *.jpg, etc.
veluca
2021-05-20 10:30:17
on linux you can also use parallel - I dunno if it exists for windows...
2021-05-20 10:30:25
but for loops are good enough too, yes πŸ˜›
2021-05-20 10:30:44
`for i in *; do cjxl $i $i.jxl; done`
2021-05-20 10:34:04
yeah, you can also do fancier things like `for i in *.png; do cjxl $i $(echo $i | sed s/png$/jxl/); done` or the builtin way for bash to do that that I never remember
Troc
2021-05-20 10:34:38
I think I'll try to pester the Megapixel dev to include newer encoder or teach me how to do it.
Scope
2021-05-20 10:35:16
Replace the old exe and rename it to cjpegxl
veluca
2021-05-20 10:35:25
bash has waaaay too many magic characters for replacements πŸ˜›
Troc
2021-05-20 10:35:27
I wonder if it's that easy.
2021-05-20 10:35:38
I'l test.
Scope
2021-05-20 10:36:24
It's just a GUI that calls the encoder exe, so it should work
Troc
2021-05-20 10:38:42
Seems like it is working.
fab
2021-05-20 10:39:19
Yes you can change encoder Name like cjxlf
Troc
2021-05-20 10:40:17
RAM use is still high with Speed 8 but seems to be only one third of what 9 takes.
2021-05-20 10:41:03
It's really going at my SSD
Crixis
2021-05-20 10:47:03
ssd bottleneck? Cool
2021-05-20 10:47:20
or is the tempfile bug?
Troc
2021-05-20 10:47:25
I'd actually rather not get a bottleneck.
spider-mario
Troc Fabian, why do you use this new heuristics thing?
2021-05-20 10:47:30
Fabian likes to try many different flags, almost as if fuzzing cjxl
2021-05-20 10:48:55
also `${i/%.png/.jxl}` (with the caveat that if there is no `.png` to remove, it also won’t add `.jxl`)
2021-05-20 10:49:13
but anyway, yes, there is parallel on Windows
2021-05-20 10:49:16
in msys2
2021-05-20 10:49:21
so might as well use that
Troc
2021-05-20 10:49:53
I have a 5950x and 64 GB of 3200 Mhz RAM, so it makes sense for my SSD to be the bottleneck.
2021-05-20 10:50:42
Proof
2021-05-20 10:52:52
Maybe batch size of 16 was too large and that's slowing down my encoding.
2021-05-20 10:53:05
SSD is after all slower than RAM.
2021-05-20 10:55:05
Either way, my encoding is done. It looks nice and only about 30 MB over the Getcomics download zip despite my upscaling all the images.
spider-mario
2021-05-20 10:56:16
or `"$(perl -e 'print($ARGV[0] =~ s/\.png$/.jxl/r)' -- "$i")"`
veluca
spider-mario or `"$(perl -e 'print($ARGV[0] =~ s/\.png$/.jxl/r)' -- "$i")"`
2021-05-20 10:56:45
or also sed πŸ˜› but the point of not using sed was to not start sub-processes.... πŸ˜›
spider-mario
2021-05-20 10:56:53
(added a `--` to be safe)
veluca or also sed πŸ˜› but the point of not using sed was to not start sub-processes.... πŸ˜›
2021-05-20 10:57:32
I was just trying to be silly 😁
Troc
2021-05-20 10:58:28
Feels like I could play something like Terraria with speed 6 encode going on. 7 and 8 are too heavy, unless I lower batch size.
veluca
2021-05-20 10:59:20
6 is pretty fast πŸ˜„ should be about as fast as mozjpeg if not faster
Troc
2021-05-20 11:00:18
Basically instant on a single picture.
Scope
2021-05-20 11:03:42
Or it is possible to keep one or two free cores/threads for games (like 15 for encoding and one for games, or 30 for encoding and two for games)
2021-05-20 11:04:53
For games that don't use many threads it works well
fab
2021-05-20 11:12:17
more you try cjxl the more confused you will get
2021-05-20 11:12:43
this confusion i had only in 10 days
raysar
2021-05-20 12:19:48
I see in the last commit default quality on PNG input is d1 so no lossless and not d0. It's a choice? (i don't remenber when the change arrive)
2021-05-20 12:22:43
ah πŸ™ƒ my memory is falling πŸ˜„
veluca
2021-05-20 12:26:54
yup I think it has been like that at least for a really long while
spider-mario
2021-05-20 12:32:42
has it ever not been the case?
2021-05-20 12:32:47
(re: PNG)
fab
2021-05-20 12:33:02
2021-05-20 12:33:22
other 311 lines
jjido
2021-05-20 12:33:28
Why gif defaults to lossless?
spider-mario
2021-05-20 12:33:32
cpik was of course lossy, and when we merged it with fuif to get cjxl, I think we kept cpik’s default
fab
2021-05-20 12:33:37
it is the resume of what we discussed this morning
2021-05-20 12:33:47
if you want to read
2021-05-20 12:33:55
all
2021-05-20 12:33:59
you can download the .txt
spider-mario
jjido Why gif defaults to lossless?
2021-05-20 12:34:04
as far as I can tell, there is little point in encoding it lossily, it’s efficient enough to represent losslessly
fab
2021-05-20 12:34:04
and open with notepad
spider-mario
2021-05-20 12:34:44
after all, a GIF frame has at most 256 different colors
2021-05-20 12:34:52
so JXL can use its own palette feature
fab
2021-05-20 12:35:28
read with helvetica micro regular font
2021-05-20 12:35:30
on notepad
spider-mario
spider-mario after all, a GIF frame has at most 256 different colors
2021-05-20 12:36:03
(funny feature: those 256 colors can be different for each frame, so you can create still GIFs with many more different colors by blending various chunks on top of each other)
fab
2021-05-20 12:36:26
ah i have at 9 pt and light
2021-05-20 12:37:44
2021-05-20 12:37:53
that's how helvetica micro looks on firefox
2021-05-20 12:38:37
boring like noto sans
2021-05-20 12:38:49
on notepad though is very good
2021-05-20 12:38:58
stag sans is good on desktop
2021-05-20 12:39:04
it looks neutral on every wallpaper
2021-05-20 12:39:12
and is similar to arial
2021-05-20 12:45:33
the text (.txt) represents the confusion you could get after using for 10 days cjxl
2021-05-20 12:45:53
we sent too many messages in 1h 50m