|
Traneptora
|
2021-09-10 08:21:02
|
but I can see how someone would write code that says "they probably meant sRGB"
|
|
2021-09-10 08:21:14
|
and then just interpret it as sRGB anyway
|
|
|
_wb_
|
2021-09-10 08:21:41
|
I think we can avoid trouble by just always including an icc profile in the pngs we write
|
|
2021-09-10 08:22:26
|
Even in the cases where it's strictly speaking redundant
|
|
2021-09-10 08:23:27
|
And we might want to consider printing a warning in cjxl when we are getting a png as input that we know gets interpreted differently by different browsers/viewers
|
|
2021-09-10 08:24:03
|
Because that's a recipe for "look how jxl changed the colors!"
|
|
|
Traneptora
|
2021-09-10 08:25:04
|
the issue is that PNG spec is a bit less clear what happens if the iCCP chunk is present but the display cannot perform color management
|
|
|
|
paperboyo
|
2021-09-10 08:25:18
|
Strictly speaking it should be redundant in 100% of cases. No iCCP, no gAMA, no cHRM **should** mean sRGB. But at least default Firefox is still not that smart/conformant. That’s why Adobe’s decision to not allow to even save an ICC with sRGB PNGs seems to me premature and uncharacteristically (for them) optimistic.
TinysRGB is what I do for PNGs to be safe.
|
|
|
Traneptora
|
2021-09-10 08:25:19
|
under the gamma chunk it says this
|
|
2021-09-10 08:25:29
|
> An sRGB chunk or iCCP chunk, when present and recognized, overrides the gAMA chunk.
|
|
2021-09-10 08:25:30
|
but also this under iCCP
|
|
2021-09-10 08:25:34
|
> PNG decoders that are used in an environment that is incapable of full-fledged colour management should use the gAMA and cHRM chunks if present.
|
|
|
|
veluca
|
2021-09-10 08:26:14
|
I wonder what's the status of iccv4 support, if it's good enough (IIRC both ff and chrome are OK with it) we might want to make a v4 TinysRGB
|
|
2021-09-10 08:26:24
|
should be much smaller
|
|
|
Traneptora
|
|
paperboyo
Strictly speaking it should be redundant in 100% of cases. No iCCP, no gAMA, no cHRM **should** mean sRGB. But at least default Firefox is still not that smart/conformant. That’s why Adobe’s decision to not allow to even save an ICC with sRGB PNGs seems to me premature and uncharacteristically (for them) optimistic.
TinysRGB is what I do for PNGs to be safe.
|
|
2021-09-10 08:26:30
|
what does firefox actually do btw
|
|
2021-09-10 08:26:39
|
does it not render sRGB PNGs as sRGB?
|
|
|
_wb_
|
|
Traneptora
> PNG decoders that are used in an environment that is incapable of full-fledged colour management should use the gAMA and cHRM chunks if present.
|
|
2021-09-10 08:26:41
|
Yeah it's annoying, it's what you get with formats defined in the 90s I guess
|
|
|
|
veluca
|
2021-09-10 08:26:50
|
IIRC, it renders it as whatever your display is
|
|
2021-09-10 08:27:05
|
i.e. pass-through to the display without thinking about it
|
|
|
_wb_
|
2021-09-10 08:27:08
|
Firefox by default just throws pixels to the screen if there's no explicit colorspace
|
|
|
Traneptora
|
2021-09-10 08:27:10
|
so it doesn't perform color management
|
|
2021-09-10 08:27:25
|
or it doesn't unless one of the color chunks are present
|
|
|
_wb_
|
2021-09-10 08:27:34
|
The latter
|
|
2021-09-10 08:27:55
|
So it can be circumvented but you need to waste bytes on signaling
|
|
2021-09-10 08:28:49
|
While W3C has already for a long time specced that any untagged images are sRGB
|
|
|
|
paperboyo
|
|
Traneptora
> PNG decoders that are used in an environment that is incapable of full-fledged colour management should use the gAMA and cHRM chunks if present.
|
|
2021-09-10 08:28:55
|
> PNG decoders that are used in an environment that is incapable of full-fledged colour management should use the gAMA and cHRM chunks if present.
This is typical, over-optimistic, spec-writing: use this invented-by-us three pieces of “simple” metadata signals if you cannot be clever about it. But, well, you need to interpret it anyhow, so you need to do ICC, by which time you can just read ICC anyhow.
> Yeah it's annoying, it's what you get with formats defined in the 90s I guess
Not sure if we are not being similarly optimistic with CICP…
|
|
|
_wb_
|
2021-09-10 08:29:10
|
(I assume GIF and untagged JPEG have the same issue in firefox)
|
|
|
w
|
2021-09-10 08:30:58
|
Firefox by default only does tagged images. And by default color management is still disabled. <:pepeWeird:585744188742828042> <https://searchfox.org/mozilla-central/source/modules/libpref/init/StaticPrefList.yaml#4713>
|
|
|
|
paperboyo
|
2021-09-10 08:31:10
|
Closest to comprehensive I know of: https://kornel.ski/en/color (still not fully, and written results outdated)
|
|
|
Traneptora
|
2021-09-10 08:31:27
|
keep in mind that the PNG spec does not state that PNGs without color information are sRGB
|
|
|
_wb_
|
2021-09-10 08:31:32
|
I think we can try to minimize issues by putting as much of the color management logic into the decoder library, but the application will always have to do the actual color management because libjxl will not know the display color space
|
|
|
Traneptora
keep in mind that the PNG spec does not state that PNGs without color information are sRGB
|
|
2021-09-10 08:32:08
|
Nope, but w3c specifies that GIF and any other untagged images are sRGB
|
|
|
w
|
2021-09-10 08:32:11
|
what about providing the libjxl a display profile in decoder step
|
|
|
Traneptora
|
2021-09-10 08:32:24
|
> When the incoming image has unknown gamma (gAMA, sRGB, and iCCP all absent), choose a likely default gamma value, but allow the user to select a new one if the result proves too dark or too light. The default gamma may depend on other knowledge about the image, for example whether it came from the Internet or from the local system.
so in other words the PNG spec explicitly allows the decoder to guess or do whatever the fuck if it doesn't fidn it
|
|
|
improver
|
2021-09-10 08:32:25
|
```
#if defined(XP_MACOSX) || defined(NIGHTLY_BUILD)
value: true
#else
value: false
#endif
```
why do they hate nice things
|
|
|
_wb_
|
|
w
what about providing the libjxl a display profile in decoder step
|
|
2021-09-10 08:32:35
|
That's exactly what we are planning for a high-level decode api
|
|
|
w
|
|
|
veluca
|
|
w
what about providing the libjxl a display profile in decoder step
|
|
2021-09-10 08:32:47
|
often display profiles are LUTs though, and it can be tricky to decode to that
|
|
|
Traneptora
|
|
_wb_
That's exactly what we are planning for a high-level decode api
|
|
2021-09-10 08:32:52
|
what about zimg?
|
|
|
|
veluca
|
2021-09-10 08:33:08
|
like I think skcms doesn't fully support that
|
|
|
Traneptora
|
2021-09-10 08:33:20
|
https://github.com/sekrit-twc/zimg
|
|
2021-09-10 08:33:24
|
license is very permissive
|
|
2021-09-10 08:33:34
|
|
|
|
|
paperboyo
|
|
_wb_
I think we can try to minimize issues by putting as much of the color management logic into the decoder library, but the application will always have to do the actual color management because libjxl will not know the display color space
|
|
2021-09-10 08:33:48
|
Yeah: so here, I still cannot get my head around how is it suppose to help? So app authors can request output in any colour space? Can they request it in display colour space? If not, they should get it always in the source colour space or there will be one conversion too many? Or am I being dumb?
|
|
|
Traneptora
|
2021-09-10 08:33:52
|
it's a joke and is essentially public domain
|
|
|
w
|
2021-09-10 08:33:55
|
Oh yeah I've always wanted to ask, what are the pros of using skcms over LCMS?
|
|
2021-09-10 08:34:27
|
there's no good documentation for skcms
|
|
|
Traneptora
|
2021-09-10 08:34:30
|
You could also provide a hierarchichal API like how libplacebo does its rendering abstraction
|
|
2021-09-10 08:35:05
|
libplacebo exposes a lower level interface as well as a more convenient higher level wrapper around it which you can ignore if you want to fine tune
|
|
2021-09-10 08:35:24
|
but most applications will opt for the higher level one
|
|
|
_wb_
|
|
paperboyo
Yeah: so here, I still cannot get my head around how is it suppose to help? So app authors can request output in any colour space? Can they request it in display colour space? If not, they should get it always in the source colour space or there will be one conversion too many? Or am I being dumb?
|
|
2021-09-10 08:36:05
|
In the low level decode api, you get pixels and an icc profile, and the application hopefully can deal with that. By always being able to produce an icc profile, at least there is only one code path to implement in applications, so hopefully that's less error prone.
|
|
|
|
veluca
|
|
w
Oh yeah I've always wanted to ask, what are the pros of using skcms over LCMS?
|
|
2021-09-10 08:36:13
|
IIRC: lcms is slower by default and less well-written (say, used to be not quite thread safe), but supports more things
|
|
|
_wb_
|
2021-09-10 08:36:58
|
In the high level decode api, we could deal with color management completely and return pixels ready to send to screen
|
|
|
|
paperboyo
|
|
_wb_
In the high level decode api, we could deal with color management completely and return pixels ready to send to screen
|
|
2021-09-10 08:37:28
|
> we could deal with color management completely and return pixels ready to send to screen
So in display colour space?
|
|
|
Traneptora
|
2021-09-10 08:37:43
|
speaking of dependencies, is there a way to use system dependencies?
|
|
2021-09-10 08:37:53
|
like brotli is a common system lib
|
|
2021-09-10 08:38:00
|
we don't need to include it as a git submodule
|
|
|
|
veluca
|
|
Traneptora
|
|
2021-09-10 08:38:01
|
https://en.wikipedia.org/wiki/WTFPL it's not quite 100% agreed upon that that's an OK license everywhere 😛
|
|
|
Traneptora
speaking of dependencies, is there a way to use system dependencies?
|
|
2021-09-10 08:38:20
|
-DJPEGXL_FORCE_SYSTEM_BROTLI I believe
|
|
2021-09-10 08:38:29
|
other things for the most part should come for the system
|
|
|
Traneptora
|
2021-09-10 08:38:41
|
I mean, that should be default
|
|
2021-09-10 08:38:58
|
what happens if you git clone from the libjxl repo and try to build with cmake it goes "run ./deps.sh"
|
|
2021-09-10 08:38:59
|
which you then do
|
|
2021-09-10 08:39:06
|
and then it downloads them all even if you don't need them
|
|
|
|
veluca
|
2021-09-10 08:39:22
|
file an issue 😛
|
|
|
_wb_
|
|
paperboyo
> we could deal with color management completely and return pixels ready to send to screen
So in display colour space?
|
|
2021-09-10 08:40:52
|
Yes, well, the application will still have to say what display space they want, e.g. by giving an icc profile
|
|
2021-09-10 08:41:29
|
There's no way we can know which of the possibly several screens the application wants to send pixels to
|
|
|
|
veluca
|
2021-09-10 08:42:27
|
I always wondered what would happen if you put a window halfway between two displays with different ICC...
|
|
|
_wb_
|
2021-09-10 08:42:36
|
But also for CMYK, a high level api would be useful
|
|
|
w
|
2021-09-10 08:42:43
|
theres no app which splits it
|
|
|
_wb_
|
|
veluca
I always wondered what would happen if you put a window halfway between two displays with different ICC...
|
|
2021-09-10 08:42:48
|
MacOS does not let me do that
|
|
2021-09-10 08:43:18
|
Every window is only on one screen
|
|
|
w
|
2021-09-10 08:43:30
|
although it doesn't sound too hard to do
|
|
|
_wb_
|
2021-09-10 08:44:03
|
Would be weird if one half is wide gamut and the other is standard gamut HDR
|
|
|
w
|
2021-09-10 08:44:28
|
the current windows photos app switches profiles between displays instantly and uses the center to pick
|
|
|
|
paperboyo
|
|
paperboyo
> PNG decoders that are used in an environment that is incapable of full-fledged colour management should use the gAMA and cHRM chunks if present.
This is typical, over-optimistic, spec-writing: use this invented-by-us three pieces of “simple” metadata signals if you cannot be clever about it. But, well, you need to interpret it anyhow, so you need to do ICC, by which time you can just read ICC anyhow.
> Yeah it's annoying, it's what you get with formats defined in the 90s I guess
Not sure if we are not being similarly optimistic with CICP…
|
|
2021-09-10 08:44:49
|
Bad manners and awful to reply to oneself, but I’ve tried to express my worries about
> Not sure if we are not being similarly optimistic with CICP…
here: https://github.com/AOMediaCodec/av1-avif/issues/84#issuecomment-626153246
|
|
|
_wb_
|
2021-09-10 08:45:36
|
It's an issue with video people: they always think color spaces are someone else's problem
|
|
2021-09-10 08:47:18
|
Getting videos to display consistently across different codecs and different implementations is a major pain
|
|
2021-09-10 08:48:20
|
Even in same browser, same platform, you can get different results depending on whether hw decode is used or sw decode
|
|
|
Traneptora
|
|
veluca
I always wondered what would happen if you put a window halfway between two displays with different ICC...
|
|
2021-09-10 08:50:12
|
|
|
2021-09-10 08:50:28
|
mpv picks a display
|
|
2021-09-10 08:50:33
|
and renders for that one
|
|
|
improver
|
2021-09-10 08:50:55
|
by where middle of window is, or something else?
|
|
|
Traneptora
|
2021-09-10 08:51:27
|
mpv also doesn't split the refresh rate either
|
|
2021-09-10 08:51:40
|
but it does adapt that as soon as it's fully in the other monitor
|
|
|
w
|
2021-09-10 08:52:17
|
on windows, the window's handle gets associated to a single display, and it uses the center. I would assume other OS libraries do the same.
|
|
|
Traneptora
|
2021-09-10 08:52:47
|
in X11 most applications have a display that they belong to by default
|
|
2021-09-10 08:52:56
|
which is usually where the cursor is when it's launched
|
|
2021-09-10 08:53:15
|
some applications are a pain if they're not programmed to be able to just be moved
|
|
|
w
|
2021-09-10 08:53:31
|
yeah same experience on windows
|
|
|
Traneptora
|
2021-09-10 08:53:44
|
for example if I open GIMP on my right display, and then move it to the left, and then open the toolbox, the toolbox still ends up on the right
|
|
2021-09-10 08:53:53
|
the fastest way to solve this is to quit and relaunch it from the left
|
|
2021-09-10 08:54:49
|
like I push Ctrl+B and it ends up over here anwyay even though this is the right monitor and the gimp window is on the far left
|
|
2021-09-10 08:55:52
|
interestingly, that screenshot of the GIMP color dialog doesn't produce the same color as the dialog itself
|
|
2021-09-10 08:55:54
|
TIL
|
|
2021-09-10 08:56:37
|
rgb(23, 112, 19)
|
|
2021-09-10 08:56:50
|
became (5, 112, 30)
|
|
|
spider-mario
|
|
veluca
I always wondered what would happen if you put a window halfway between two displays with different ICC...
|
|
2021-09-10 09:42:25
|
iirc, Chrome switches the moment the center of the window crosses the border
|
|
2021-09-10 09:43:00
|
but yeah, at least on Linux and Windows, it’s up to the applications to handle this
|
|
2021-09-10 09:43:05
|
and I doubt that many of them bother
|
|
2021-09-10 09:43:21
|
few even bother to handle this for single-display setups after all
|
|
2021-09-10 09:43:52
|
for the viewers in libjxl, we handle single display but not more
|
|
2021-09-10 09:44:11
|
ideally, we would, but it seemed like too much effort
|
|
|
Traneptora
|
2021-09-11 07:04:46
|
it's just such an edge case
|
|
|
Fraetor
|
2021-09-13 07:59:21
|
~~Can someone remind me how to compile the GDK PixBuf module for jxl? I've done it before, but can't remember how to do it now.~~
|
|
2021-09-13 08:03:06
|
Ignore that.
|
|
2021-09-13 08:03:59
|
I forgot that it was compiled with the rest of libjxl. It's just that I need to re-associate eog with the image/jxl mime type.
|
|
|
Nova Aurora
|
|
veluca
https://en.wikipedia.org/wiki/WTFPL it's not quite 100% agreed upon that that's an OK license everywhere 😛
|
|
2021-09-15 07:14:10
|
Yeah something to do with corporate lawyers going "What is this? Why does it exist?" When people ask if they can use stuff under it in the companies apps.
|
|
|
|
veluca
|
2021-09-15 07:14:47
|
Basically :P
|
|
|
|
Deleted User
|
2021-09-16 12:53:29
|
I'd **love** to use WTFPL, but I'm de facto forced to use Unlicense (still cool) because it contains explicit liability and warranty limitations that WTFPL lacks.
|
|
|
Fraetor
|
2021-09-16 11:32:15
|
You can put the warranty limitations into the WTFPL. From the license's website:
|
|
|
|
Deleted User
|
2021-09-16 03:11:40
|
I know about that clause (I've read the website), but this way looks... shoehorned? I prefer it to be explicit in the license text itself.
|
|
|
improver
|
2021-09-16 03:12:26
|
I personally don't
|
|
2021-09-16 03:12:49
|
though being a bit legally questionable kinda disqualifies it as license of choice for me
|
|
2021-09-16 03:13:10
|
like if you wanna declare something public domain, just do it, why gimmicks
|
|
2021-09-16 03:13:43
|
if you wanna ensure that it's really really available, CC0
|
|
2021-09-16 03:15:16
|
which, btw, does not include "warranty" stuff either
|
|
|
spider-mario
|
2021-09-16 05:01:19
|
FWIW, it seems Google cannot contribute to projects under the WTFPL: https://opensource.google/docs/patching/#forbidden
|
|
2021-09-16 05:01:31
|
but using seems fine: https://opensource.google/docs/thirdparty/licenses/#notice
|
|
|
Nova Aurora
|
|
spider-mario
FWIW, it seems Google cannot contribute to projects under the WTFPL: https://opensource.google/docs/patching/#forbidden
|
|
2021-09-16 06:29:26
|
Why does BSD0 get a pass compared to other public domain equivalents?
|
|
|
spider-mario
|
2021-09-16 06:30:16
|
¯\_(ツ)_/¯
|
|
|
Fraetor
|
|
improver
like if you wanna declare something public domain, just do it, why gimmicks
|
|
2021-09-16 07:42:36
|
I think the reason you can't just say public domain is that not all countries have a legal concept of public domain.
|
|
|
Nova Aurora
|
2021-09-16 07:50:55
|
So these licenses try to give the same rights in the absence of legal public domain
|
|
|
Fraetor
|
2021-09-16 08:54:08
|
Yeah.
|
|
|
Traneptora
|
|
I'd **love** to use WTFPL, but I'm de facto forced to use Unlicense (still cool) because it contains explicit liability and warranty limitations that WTFPL lacks.
|
|
2021-09-19 06:58:37
|
what's the difference between the Unlicense and the MIT license basically
|
|
2021-09-19 06:58:38
|
in practice
|
|
2021-09-19 06:59:00
|
MIT license iirc just contains "you can do anything you want, under the condition you put this text file in the thing you do with it"
|
|
2021-09-19 06:59:09
|
and also waives implied warranty
|
|
|
|
Deleted User
|
|
Traneptora
what's the difference between the Unlicense and the MIT license basically
|
|
2021-09-19 07:09:04
|
MIT requires crediting the author. It's a nice thing, but I want even higher freedom than that for *my* software. Not like I have any beef with MIT license 🙂
|
|
|
Traneptora
|
2021-09-19 07:32:57
|
ah. so for most practical purposes it's the same
|
|
2021-09-19 07:33:07
|
since you can do the same things, you just need a text file
|
|
2021-09-19 07:33:17
|
there's nothing you can't do with MIT license that unlicense allows
|
|
2021-09-19 07:33:50
|
now, I wonder if there's a hyper embedded system case where the license file is large enough to take up a nontrivial amount of space
|
|
2021-09-19 07:34:03
|
in that event, I suppose being able to obtain the license from the manufacturer's website would suffice
|
|
|
_wb_
|
2021-09-19 07:44:09
|
Not sure. Putting it in the smallprint somewhere with the "safety information" etc is probably the safest option
|
|
|
Traneptora
|
2021-09-19 07:44:38
|
not that this is anything beyond hypothetical in this case though
|
|
2021-09-19 07:45:00
|
if it's placed in the owner's manual rather than in the firmware itself I can imagine that is sufficient
|
|
2021-09-19 07:45:07
|
since the MIT license is by design to allow people to use it
|
|
|
|
Deleted User
|
2021-09-20 12:34:35
|
With MIT you're supposed to distribute a license and copyright notice.
But with Unlicense you don't have to do *even that*.
|
|
|
Prower250
|
2021-09-25 01:29:41
|
HELP! I'm trying to install Butteraugli on Windows and the README states the code will compile if "_CRT_SECURE_NO_WARNINGS" is defined in the project settings. I don't know where the project settings are.
|
|
|
monad
|
|
Prower250
HELP! I'm trying to install Butteraugli on Windows and the README states the code will compile if "_CRT_SECURE_NO_WARNINGS" is defined in the project settings. I don't know where the project settings are.
|
|
2021-09-25 05:26:55
|
<@!376221034946494465> <https://docs.microsoft.com/en-us/cpp/build/reference/d-preprocessor-definitions?view=msvc-160> I guess (just used a search engine). The butteraugli in the libjxl repo is newer, btw.
|
|
|
_wb_
|
2021-09-26 06:41:38
|
Probably we should make some kind of benchmarking package that includes the butteraugli and ssimulacra from libjxl, which don't depend on opencv at all
|
|
|
Fraetor
|
2021-09-26 11:25:37
|
What are the dependencies required to build the gdk-pixbuf plugin? I've got it working in the past, but can't remember what I need to do currently.
|
|
|
|
tufty
|
2021-09-29 10:44:28
|
I've made a gtk4 image viewer with jxl support!
it's on flathub if anyone is interested, so it's a one-click install: https://flathub.org/apps/details/org.libvips.vipsdisp
supports very large images, animation, loader is sandboxed and fuzzed, many other formats, visualisation tools, etc.
more technical info here: https://github.com/jcupitt/vipsdisp#features
|
|
2021-09-29 10:45:31
|
oh, sorry, probably the wrong chat room
|
|
|
improver
|
2021-09-30 01:09:48
|
channel is not too wrong dont worry this is really cool though. does it do color mgmt for all the stuff it supports?
|
|
|
|
tufty
|
2021-09-30 07:09:51
|
<@!260412131034267649> thanks!
No colour mgmt yet --- this is going to be the image view window for an image processing package, so colour management will be done elsewhere in the system. This viewer should have a simple thing too though, you're right. It's missing some other obvious stuff, the README has a list.
Eg. you can save images in other formats, but there's no UI at the moment for image save options, so (for example, again) save as PNG always saves losslessly, there's no save as palette RGB
The underlying image processing library has all this stuff, it's just a question of hooking up some UI
|
|
2021-09-30 07:12:05
|
Anyway, it's much faster than eg. "eog" for large images (and has jxl support, woo!)
|
|
|
Fraetor
|
2021-09-30 11:25:03
|
It wasn't able to open a JXL image for me (cjxl encoded, both lossy and lossless). Is that something recently added that might not have made its way into the flatpak yet?
|
|
|
monad
|
2021-09-30 12:08:30
|
I didn't have issues with opening JXLs. But I only tried a few files as the flatpack is not convenient for me.
|
|
|
Fraetor
|
2021-09-30 07:31:06
|
OK, I've narrowed down the issue. It doesn't like a lossless transcoded JPEG.
|
|
|
_wb_
|
2021-09-30 07:41:54
|
Maybe container vs no container issue?
|
|
2021-09-30 07:42:12
|
Try encoding a png with cjxl --container
|
|
2021-09-30 07:42:25
|
Or encoding a jpg with cjxl --strip
|
|
|
Fraetor
|
2021-09-30 09:25:19
|
That seemed to be it.
|
|
2021-09-30 09:25:30
|
This file works.
|
|
2021-09-30 09:26:01
|
This file (created from, the jpeg with the -j option) does not work,
|
|
2021-09-30 09:28:02
|
I'll file an issue on the GitHub.
|
|
|
_wb_
|
2021-09-30 11:04:33
|
Likely the container magic is not detected
|
|
|
|
tufty
|
2021-10-01 06:21:34
|
yes, it wasn't checking the signature correctly, fixed now, thank you!
|
|
|
improver
channel is not too wrong dont worry this is really cool though. does it do color mgmt for all the stuff it supports?
|
|
2021-10-01 04:55:04
|
actually, now I check, it does sort-of do colour management -- it just forces everything to srgb
not a very useful thing to do, and there's no UI to control the process yet, but it is taking profiles into account
|
|
|
spider-mario
|
2021-10-01 05:26:01
|
source profiles, that is
|
|
|
|
tufty
|
2021-10-01 05:34:23
|
yes, exactly
|
|
|
|
Deleted User
|
2021-10-03 07:04:14
|
<@!877735395020927046> is there any way to translate `file-jxl` GIMP plugin? I'd gladly help!
|
|
|
novomesk
|
|
<@!877735395020927046> is there any way to translate `file-jxl` GIMP plugin? I'd gladly help!
|
|
2021-10-04 06:53:47
|
Strings must be marked translate-able (right now they are not) and then the translation is made in Poedit. That's approximately how it is made in official GIMP.
|
|
|
|
xiota
|
|
<@!877735395020927046> is there any way to translate `file-jxl` GIMP plugin? I'd gladly help!
|
|
2021-10-05 07:30:51
|
I don't have any experience adding translations to programs. Based on a quick search, it looks like it would use `gettext`. I'll start paying attention to marking strings translatable.
|
|
|
novomesk
|
|
xiota
I don't have any experience adding translations to programs. Based on a quick search, it looks like it would use `gettext`. I'll start paying attention to marking strings translatable.
|
|
2021-10-05 11:51:30
|
https://developer.gimp.org/README.i18n Read the part "Localization of third-party plug-ins"
|
|
|
w
|
2021-10-06 01:40:41
|
I made a libjxl wrapper for elixir <https://github.com/wwww-wwww/jxl_ex>
Also a demo app <https://embed.moe/URL> that transcodes to png if the browser does not support it
you can force it to do png with <https://embed.moe/png/URL> or jxl with <https://embed.moe/jxl/URL>
for example: https://embed.moe/http://jpegxl.info/logo.jxl
|
|
2021-10-06 04:15:25
|
for a github link, you get the raw url. For this it's https://embed.moe/https://raw.githubusercontent.com/libjxl/conformance/master/testcases/bicycles/input.jxl
|
|
2021-10-07 01:08:41
|
i just changed the pattern matching on the link to be easier to type. this can be used to embed jxl into discord, and still link to the actual jxl when opened in a browser
|
|
|
Scope
|
2021-10-07 01:18:33
|
|
|
2021-10-07 01:18:49
|
🤔
https://grass-test-0.gigalixirapp.com/jxl/auto/https://cdn.discordapp.com/attachments/803663417881395200/895480186965987328/2048x1320_delfi-de-la-rua-23324.jxl
|
|
2021-10-07 03:37:35
|
For ideal use it would be nice to make a very short URL and a Discord bot to automatically insert the generated links for any posted JXL images <:Stonks:806137886726553651>
|
|
|
w
|
2021-10-07 03:41:15
|
yeah i can make a discord bot that replaces jxl files
|
|
2021-10-07 03:42:05
|
although i don't know about extending too much onto this server
|
|
|
Scope
|
2021-10-07 03:54:29
|
Yep
<@!321486891079696385> Btw, if someone from the AV1 conference has their own server with some extra spare capacity, a such bot would be useful there as well 🤔
This is basically support for JXL images even without the support from Discord itself (except the preview would be in Jpeg)
|
|
|
w
|
2021-10-07 03:57:08
|
i also dont mind buying a short domain just for this
|
|
|
Scope
|
2021-10-07 03:59:46
|
Yeah, it's just a thought of what it might look like in a kind of ideal implementation
|
|
2021-10-07 04:05:08
|
And there are free domains like tk, ml, ga, cf ...
|
|
|
w
|
2021-10-07 04:05:27
|
those are always blocked
|
|
2021-10-07 04:05:44
|
if it's just jxl i was thinking jxl.rocks
|
|
|
Scope
|
2021-10-07 04:07:03
|
For this kind of links, I think some of these will be fine
|
|
|
w
|
2021-10-07 04:13:24
|
unfortunately those are all taken for jxl
|
|
|
Scope
|
2021-10-07 04:18:29
|
Well, maybe something a little longer like jxlc, jxlp or jpegxl, etc
|
|
|
monad
|
2021-10-07 04:55:27
|
jpgxl <:megapog:816773962884972565>
|
|
|
The_Decryptor
|
2021-10-07 05:39:41
|
I've tried some images I've got with that, and a few spit out "Not a valid jxl" instead of a more specific error (They're 4K screenshots, like 40MB as PNGs, so I'm guessing it's a file size limit)
|
|
2021-10-07 05:40:09
|
Apart from that though, very nice, doesn't even feel like there's any delay in loading them to me
|
|
|
w
|
2021-10-07 05:40:09
|
shouldnt be a file size limit
|
|
2021-10-07 05:40:38
|
can you send me the file or link?
|
|
|
The_Decryptor
|
2021-10-07 05:40:49
|
Sure, https://flawlesscowboy.xyz/stuff/Destiny%202%20HDR/tower.lossy.jxl
|
|
2021-10-07 05:41:37
|
It might also be because it's HDR, but things like the WIC plugin and djxl itself still decode it (just really dark) without any special flags
|
|
|
w
|
2021-10-07 05:42:01
|
the validity check only checks for the container/codestream header
|
|
2021-10-07 05:43:17
|
oh i see the issue
|
|
2021-10-07 05:45:45
|
it's a uri encoding thing
|
|
|
The_Decryptor
|
2021-10-07 05:53:47
|
I hadn't even considered that as a possibility 😆
|
|
|
w
|
2021-10-07 05:54:43
|
haha this image killed the node
|
|
|
|
veluca
|
|
w
haha this image killed the node
|
|
2021-10-07 08:23:21
|
I hope that's not a bug on our side 😛
|
|
|
w
|
2021-10-07 08:37:17
|
nah it just gets killed when oom
|
|
2021-10-07 08:37:25
|
im trying to get it onto google app engine instead
|
|
2021-10-08 02:57:45
|
https://embed.moe/png/https://flawlesscowboy.xyz/stuff/Destiny%202%20HDR/tower.lossy.jxl
|
|
|
The_Decryptor
|
2021-10-08 03:20:24
|
Nice, like the new URL too
|
|
|
diskorduser
|
2021-10-09 05:15:50
|
`>magick 1gbxt.jpg /tmp/a.jxl
/mnt/data/yay/libjxl-git/src/libjxl/lib/jxl/encode.cc:220: Invalid value for orientation field
magick: UnableToWriteImageData `/tmp/a.jxl' @ error/jxl.c/WriteJXLImage/641.`
|
|
2021-10-09 05:19:43
|
|
|
|
diskorduser
`>magick 1gbxt.jpg /tmp/a.jxl
/mnt/data/yay/libjxl-git/src/libjxl/lib/jxl/encode.cc:220: Invalid value for orientation field
magick: UnableToWriteImageData `/tmp/a.jxl' @ error/jxl.c/WriteJXLImage/641.`
|
|
2021-10-09 05:36:20
|
Is this a bug? Should I write a bug report at imagemagick GitHub?
|
|
|
novomesk
|
|
diskorduser
Is this a bug? Should I write a bug report at imagemagick GitHub?
|
|
2021-10-09 05:46:20
|
I guess that JxlBasicInfo was not correctly initialized. File bug to imagemagick. It probably worked with older libjxl.
|
|
|
diskorduser
|
|
_wb_
|
2021-10-09 05:59:19
|
Right, the changelog explains what to do there
|
|
|
w
|
2021-10-09 11:52:28
|
http://embed.ml/https://jpegxl.info/anim_jxl_logo.jxl
|
|
2021-10-09 11:52:47
|
wrote a whole png/apng encoder in elixir but discord doesnt even support apng
|
|
2021-10-09 11:53:00
|
😩
|
|
|
Fox Wizard
|
2021-10-09 11:53:47
|
<:Cheems:884736660707901470>
|
|
|
Scope
|
2021-10-09 11:57:18
|
Same thing about animated WebP, Discord disallows this stuff because they want people to use animated stickers and emoji
|
|
|
improver
|
2021-10-10 12:07:54
|
well at least it shows proper in browsers incapable of jxl when opened as orig
|
|
|
Scope
|
2021-10-10 12:14:07
|
Yep, I think encoding in Jpeg would be less resource consuming for the server, especially for large photos or for heavy loads, especially considering that JXL can also be lossy, but on the other hand Jpeg is less versatile and does not support transparency and animation, and it can't be used for something like a quality comparison
Lossless WebP could also be more effective for bandwidth, but it is heavier to encode
|
|
|
w
|
2021-10-10 12:19:25
|
there's like no jpeg encoder library for elixir/erlang
|
|
2021-10-10 12:23:15
|
and encoding png is so simple that i was able to implement it by hand in native elixir
|
|
|
Cool Doggo
|
|
w
wrote a whole png/apng encoder in elixir but discord doesnt even support apng
|
|
2021-10-10 12:23:49
|
but it is supported for the preview when uploading 🙂
|
|
|
Scope
|
2021-10-10 12:26:02
|
Only for full previews, as I recall, but not in chat
|
|
|
w
|
2021-10-10 12:26:16
|
<:sadge:860304344771461130>
|
|
|
Cool Doggo
|
2021-10-10 12:26:52
|
yes, joking about discord being able to support it easily but not doing so
|
|
|
Scope
|
2021-10-10 12:28:56
|
Most likely to promote paid features, because then Stickers would become useless
|
|
|
w
|
2021-10-10 01:41:42
|
i guess i have to make a gif wrapper aswell
|
|
2021-10-11 09:45:03
|
https://embed.moe/image.gif?q=https://jpegxl.info/anim_jxl_logo.jxl
|
|
2021-10-11 09:45:20
|
discord not only checks the image itself, but it also requires the path to be a gif to embed a gif
|
|
|
|
Deleted User
|
2021-10-11 12:47:05
|
WebM/VP9 next? 🙂
|
|
|
w
|
2021-10-11 06:40:34
|
that's way too heavy
|
|
|
BlueSwordM
|
|
WebM/VP9 next? 🙂
|
|
2021-10-11 09:05:26
|
Is there even a need for it?
|
|
2021-10-11 09:05:37
|
VP9 is natively supported in Discord 🤔
|
|
|
Cool Doggo
|
2021-10-11 09:16:46
|
animation to vp9 i think
|
|
|
nathanielcwm
|
|
w
discord not only checks the image itself, but it also requires the path to be a gif to embed a gif
|
|
2021-10-22 03:51:19
|
or just use tenor <:kekw:808717074305122316>
h264 = gif apparently
|
|
|
w
|
2021-10-26 01:31:23
|
useful/not?
|
|
|
190n
|
2021-10-26 01:34:08
|
whoa! is that a new discord feature or a modded client?
|
|
|
w
|
2021-10-26 01:34:28
|
i wouldnt say new
|
|
2021-10-26 01:34:42
|
commands and interactions have been around for a while
|
|
|
190n
|
2021-10-26 01:35:37
|
ooh, i've seen commands but i just hadn't encountered a bot using the context menu thing yet
|
|
|
_wb_
|
2021-10-26 04:49:46
|
Cool!
|
|
|
w
|
2021-10-26 06:05:08
|
if you want to add it https://discord.com/oauth2/authorize?client_id=902036286074925096&permissions=277025704000&scope=applications.commands%20bot
|
|
|
fab
|
|
w
if you want to add it https://discord.com/oauth2/authorize?client_id=902036286074925096&permissions=277025704000&scope=applications.commands%20bot
|
|
2021-10-26 08:37:35
|
does it store another copy of the image on the web other than the one you send to discord?
|
|
|
w
|
2021-10-26 08:38:06
|
it caches the decoded image for an hour
|
|
|
fab
|
2021-10-26 08:38:46
|
what does it means
|
|
2021-10-26 08:39:11
|
|
|
2021-10-26 08:39:20
|
i can't embed
|
|
2021-10-26 08:39:40
|
useless
|
|
|
w
|
2021-10-26 08:39:47
|
<:Thonk:805904896879493180>
|
|
|
fab
|
2021-10-26 08:40:47
|
on my server i can embed because i'm the admin
|
|
2021-10-26 08:41:30
|
but i don't know if i really save internet bandwidth in this way or image get stored on internet two times
|
|
2021-10-26 08:44:35
|
<@!288069412857315328> answer
|
|
|
w
|
2021-10-26 08:44:57
|
you wont save internet bandwidth
|
|
|
fab
|
2021-10-26 08:47:30
|
ok but can be enabled fo eveyone in sev without admin pemission
|
|
2021-10-26 08:47:50
|
admin confims it
|
|
2021-10-26 08:48:12
|
i upload a jxl and eveyone see in full screen
|
|
2021-10-26 08:48:49
|
also why don't you extend to avif?
|
|
|
w
|
2021-10-26 08:49:14
|
because i dont feel like it
|
|
|
fab
|
2021-10-26 08:49:18
|
avif decoder is heavy?
|
|
|
w
because i dont feel like it
|
|
2021-10-26 08:49:51
|
so i confimed the bot on my seve
|
|
2021-10-26 08:50:08
|
if someone upload jxl will be seen on full screen
|
|
2021-10-26 08:50:28
|
or i have to extend it (as admin
|
|
2021-10-26 09:23:25
|
<@!288069412857315328>
|
|
|
w
|
2021-10-26 09:23:36
|
stop pinging me
|
|
|
fab
|
2021-10-26 09:23:43
|
so i confimed the bot on my seve
if someone upload jxl will be seen on full screen
or i have to extend it (as admin
|
|
|
_wb_
|
|
w
if you want to add it https://discord.com/oauth2/authorize?client_id=902036286074925096&permissions=277025704000&scope=applications.commands%20bot
|
|
2021-10-26 12:29:07
|
done
|
|
|
fab
|
2021-10-26 12:43:04
|
|
|
2021-10-26 12:43:14
|
wb it woks
|
|
2021-10-26 12:43:18
|
i can do it
|
|
|
|
embed
|
2021-10-26 12:43:24
|
https://embed.moe/https://cdn.discordapp.com/attachments/803663417881395200/902537817895338024/unknow88n.png.jxl
|
|
|
fab
|
2021-10-26 12:44:30
|
32 seconds total after uploading
|
|
|
|
Deleted User
|
2021-11-16 01:20:26
|
Not sure why you would need an extra tool... https://videocardz.com/newz/nvidia-launches-image-quality-comparison-and-analysis-tool-icat
|
|
|
|
Hello71
|
2021-11-16 03:23:17
|
it seems that cjxl only copies exif, not xmp, but only if -j, not if png input or bit-exact jpeg transcoding. what's up with that?
|
|
|
_wb_
|
2021-11-16 04:39:37
|
it should copy exif and xmp in all cases of png and jpg input, but maybe something is broken?
|
|
2021-11-16 04:41:08
|
note that there might be a few different ways to add exif/xmp to png and maybe we only support some of those ways - it's not standardized very well how to add metadata to png
|
|
|
|
Hello71
|
2021-11-16 04:59:37
|
right, i can understand if exiftool prints xmp but cjxl doesn't understand it, but it is odd that cjxl detects xmp but only in some modes, and always detects exif. if -d 1 secretly disables metadata (since it is no longer accurate after reencoding) then i would expect it to affect xmp and exif equally
|
|
|
_wb_
|
2021-11-16 05:24:29
|
It is not intentionally stripping anything unless you do cjxl --strip
|
|
|
|
Hello71
|
2021-11-16 05:29:02
|
so concretely, if i run `cjxl image.jpg` and it says `Encoding [Container | JPEG, lossless transcode, squirrel | JPEG reconstruction data | x-byte Exif | y-byte XMP], 12 threads.` (where x and y are integers) and then run `cjxl -d 1 image.jpg` and it says `Encoding [Container | VarDCT, d1.000, squirrel | x-byte Exif], 12 threads.` (where x is the same integer as previously) that's a bug?
|
|
|
_wb_
|
2021-11-16 05:40:47
|
Yes
|
|
2021-11-16 05:43:40
|
That's a bug in cjxl not copying the xmp for some reason in that code path
|
|
|
|
Hello71
|
2021-11-16 06:16:02
|
actually looking at the code now, i'm not sure how xmp gets read in the first place
|
|
2021-11-16 06:18:32
|
er, wait, i lost track of where i was.
|
|
2021-11-16 06:21:53
|
so DecodeImageJPGCoefficients is DecodeImageJPG which is not DecodeImageJPG :/
|
|
2021-11-16 06:23:08
|
anyways, SetBlobsFromJpegData reads exif and xmp. it is called via DecodeImageJPGCoefficients -> jpeg::DecodeImageJPG. in jxl::extras::DecodeImageJPG, exif is read by ReadExif
|
|
|
|
Deleted User
|
2021-11-19 07:03:12
|
There are weird things happening when I tried to re-build libjxl in Squoosh based on the latest git `4413553`. It's complaning about something related to skcms...
```
Building CXX object lib/CMakeFiles/jxl_dec-obj.dir/jxl/toc.cc.o
/emsdk/upstream/emscripten/em++ \pm:load:cleanup
-O3 -flto -std=c++17 -Wno-deprecated-declarations -pthread \
-O3 -flto -s FILESYSTEM=0 -s PTHREAD_POOL_SIZE=navigator.hardwareConcurrency -s ALLOW_MEMORY_GROWTH=1 -s TEXTDECODER=2 -s NODEJS_CATCH_EXIT=0 -s NODEJS_CATCH_REJECTION=0 \
-I node_modules/jxl \
-I node_modules/jxl/lib \
-I node_modules/jxl/lib/include \
-I node_modules/jxl/build/mt-simd/lib/include \
-I node_modules/jxl/third_party/highway \
-I node_modules/jxl/third_party/skcms \
--bind \
-s ENVIRONMENT=worker \
-s EXPORT_ES6=1 \
-o enc/jxl_enc_mt_simd.js \
enc/jxl_enc.cpp node_modules/jxl/build/mt-simd/lib/libjxl.a node_modules/jxl/build/mt-simd/lib/libjxl_threads.a \
node_modules/jxl/build/mt-simd/third_party/brotli/libbrotlidec-static.a \
node_modules/jxl/build/mt-simd/third_party/brotli/libbrotlienc-static.a \
node_modules/jxl/build/mt-simd/third_party/brotli/libbrotlicommon-static.a \
node_modules/jxl/build/mt-simd/third_party/libskcms.a \
node_modules/jxl/build/mt-simd/third_party/highway/libhwy.a
em++: error: node_modules/jxl/build/mt-simd/third_party/libskcms.a: No such file or directory ("node_modules/jxl/build/mt-simd/third_party/libskcms.a" was expected to be an input file, based on the commandline arguments provided)
make: *** [Makefile:39: enc/jxl_enc_mt_simd.js] Error 1
make: *** Waiting for unfinished jobs....
```
|
|
2021-11-19 07:06:55
|
That was clean compile, with the whole Squoosh repo removed completely from drive and re-cloned from remote.
|
|
2021-11-19 07:08:40
|
Surprisingly enough v0.6.1 worked...
|
|
2021-11-20 11:13:28
|
<@&803357352664891472> <@228116142185512960> is it something related to libjxl or Squoosh?
|
|
|
_wb_
|
2021-11-20 11:18:55
|
no idea but it looks like a build script problem if you get `No such file or directory`
|
|
|
|
Deleted User
|
2021-11-20 02:52:25
|
No idea either. Just like I said, those were clean compiles from clean directories, both v0.6.1 and latest git.
|
|
|
Fraetor
|
2021-11-21 03:48:35
|
What formats can be used to for CMYK images in cjxl?
|
|
|
_wb_
|
2021-11-21 03:58:02
|
Atm only PSD
|
|
2021-11-21 03:58:52
|
And it probably only works if you don't try to use XYB, e.g. lossless should be fine but vardct probably not
|
|
|
Fraetor
|
2021-11-21 03:58:59
|
cjxl can do PSD? That should probably be added to the help screen.
|
|
|
_wb_
|
2021-11-21 04:03:37
|
It's kind of experimental and partially implemented only
|
|
2021-11-21 04:04:11
|
I added it to test layers, spot colors and cmyk, since we didn't have any input format for those things yet
|
|
|
Fraetor
|
2021-11-21 04:08:11
|
fair.
|
|
|
joppuyo
|
2021-12-12 10:35:16
|
is there a tool that prints information about a jxl file?
some specific things I'm interested is if the image is modular/vardct and if it's progressive or not. I tried jxlinfo and exiftool but no dice. jxlinfo prints just some very basic information like height and width and exiftool only reads data from the exif chunk
|
|
|
_wb_
|
2021-12-12 12:07:19
|
Modular/vardct and progressive is not currently exposed in the API
|
|
2021-12-12 12:07:24
|
So jxlinfo does not know
|
|
2021-12-12 12:07:49
|
Uses_original_profile is maybe more useful info than modular vs vardct
|
|
2021-12-12 12:08:01
|
If true, it's possible that the file is lossless
|
|
2021-12-12 12:08:08
|
If false, it's certainly lossy
|
|
|
joppuyo
|
2021-12-12 01:19:30
|
Ah, okay. But a decoder should know the encoding type, right? I was checking the format draft and frame header does contain at least a field for the encoding type
|
|
2021-12-12 01:22:57
|
A decoder would probably also need to know if the file is progressive or not, I looked into the documentation and there seemed to be at least four different types of progressive encoding so it was not super clear to me how it works under the hood 😅
|
|
|
_wb_
|
2021-12-12 02:10:09
|
Modular vs vardct is a frameheader field, we could expose it, just not sure why it would matter from an application pov
|
|
2021-12-12 02:11:09
|
Progressive decode works in the sense that you can send partial data and call Flush to get progressive previews.
|
|
2021-12-12 02:13:43
|
We are adding an subscribed event so you can also get intermediate stages explicitly
|
|
2021-12-12 02:14:41
|
But yes, it might also be good to expose info about what stages will be available and when (what byte offset)
|
|
2021-12-12 02:15:01
|
This is possible to know after decoding the frame header (including toc)
|
|
|
Jim
|
2021-12-12 04:57:19
|
I would think it would be useful for graphic designers and developers to be able to see at a glance if it's lossless or lossy.
|
|
|
_wb_
|
2021-12-12 05:34:33
|
The only thing we can tell is "certainly lossy" and "maybe lossless"
|
|
|
joppuyo
|
2021-12-12 06:07:19
|
I think it could be useful to have that info since it's not something you can tell right away from the file extension like with JPEG and PNG. I think this "problem" started with WebP
|
|
2021-12-12 06:09:53
|
Right now I'm debugging a library I'm working on and the way I validate that different encoding options like quality/losslessness/progressive are passed correctly is I run cwebp/convert/vips jxlsave with the same parameters and check that the MD5 hash matches
|
|
|
Scope
|
2021-12-12 06:24:46
|
Because JPEG and PNG are different formats, not just modes and further JPEG formats also had a lossless mode
|
|
|
spider-mario
|
2021-12-12 06:36:39
|
and some PNGs are recompressed from lossy sources
|
|
|
_wb_
|
2021-12-12 06:38:05
|
The original JPEG spec had a lossless mode. The IJG libjpeg didn't bother to implement it though, so it didn't become part of the de facto standard.
|
|
|
spider-mario
|
2021-12-12 06:38:29
|
how good was that lossless mode, by the way?
|
|
2021-12-12 06:38:40
|
if it was added to libjpeg today, would there be any point in using it?
|
|
|
_wb_
|
2021-12-12 06:39:03
|
Also most PNGs that Cloudinary serves on the web are lossy ones - we either reduce to png8 or do some preprocessing to make png24/32 compress better.
|
|
|
spider-mario
|
2021-12-12 06:39:12
|
(I suppose that if the answer was “yes”, it would probably have been added, so I guess not)
|
|
|
_wb_
|
|
spider-mario
how good was that lossless mode, by the way?
|
|
2021-12-12 06:39:52
|
It sucks, it's basically same as DC encoding so just a West predictor and Huffman coding of the residuals, iirc.
|
|
2021-12-12 06:40:45
|
Still better than the alternatives of the time though (BMP and TIFF)
|
|
2021-12-12 06:42:47
|
I think it mostly didn't get implemented because people didn't have full-color screens anyway, only at most 256-color ones, so GIF was better as a "lossless" format.
|
|
|
spider-mario
|
2021-12-12 06:45:02
|
the human eye can’t see more than 256 colors anyway
|
|
|
Fox Wizard
|
2021-12-12 07:00:11
|
Nah, we all know 64 is the limit
|
|
|
_wb_
|
2021-12-12 07:06:25
|
640 colors ought to be enough for anybody
|
|
|
joppuyo
|
2021-12-13 12:40:10
|
I did some oppo research and it seems like imagemagick identify doesn't know if webp is lossy or lossless, only if it's paletted or RGB (I think webp makes a file paletted if it has less than 255 colors or something)
|
|
2021-12-13 12:40:27
|
Here's output for webpinfo
```
webpinfo lena-lossy.webp
File: /path/to/file/lena-lossy.webp
RIFF HEADER:
File size: 37998
Chunk VP8 at offset 12, length 37986
Width: 512
Height: 512
Alpha: 0
Animation: 0
Format: Lossy (1)
No error detected.
webpinfo lena-lossless.webp
File: /path/to/file/lena-lossless.webp
RIFF HEADER:
File size: 416526
Chunk VP8L at offset 12, length 416514
Width: 512
Height: 512
Alpha: 0
Animation: 0
Format: Lossless (2)
No error detected.
```
|
|
|
_wb_
|
2021-12-13 12:41:37
|
Note that near-lossless webp will also look like lossless
|
|
|
joppuyo
|
2021-12-14 01:47:39
|
**jxl, lossy, lossless and progressive:** I'm currently writing a library for converting images to jxl and I want to have some sane defaults. Right now if the user specifies lossy compression, progressive encoding is turned on by default. If the user specifies lossless compression, the progressive is turned off by default. My reasoning is that progressive lossless jxls are much larger than non-progressive ones. Is this a good default or not? I think a progressive lossless image *can* be smaller than a non-progressive one if the client downloads only part of the image. But there doesn't seem to be any browser/client that supports this currently.
|
|
2021-12-14 01:48:03
|
and by lossy I mean vardct and lossless modular 🙂
|
|
|
improver
|
2021-12-14 01:57:41
|
> Is this a good default or not?
id say yes, that's the same default as in cjxl
|
|
2021-12-14 01:58:15
|
it uses squeeze for progressive modular iirc and that's quite less efficient
|
|
|
joppuyo
|
2021-12-14 02:03:04
|
ok, great that I'm not doing anything that's not smart
|
|
2021-12-14 02:04:12
|
now I just need to wait for imagemagick and vips to add support for progressive encoding, since I want to support using those as a backend too in addition to cjxl 😅
|
|
|
gnat
|
2021-12-20 09:14:24
|
Current easy way to encode a list of png files into a looping jxl animation?
|
|
|
_wb_
|
2021-12-20 10:56:34
|
maybe `ffmpeg -i frame%d.png input.apng; cjxl input.apng output.jxl` works, I dunno
|
|
|
gnat
|
2021-12-20 11:16:14
|
Nice. Also very pleased to see prebuilt linux releases, so I don't have to hunt down a ton of dev libraries. amd64 Ubuntu here.
|
|
2021-12-20 11:16:16
|
Also thumbnailer package = Nice.
|
|
2021-12-20 12:35:18
|
Works except for APNG with transparency I get this.
```
cjxl ./test.apng output.jxl -v
JPEG XL encoder v0.6.1 0.6.1 [Scalar]
Corrupt or CMYK JPEG.
Failed to read image ./test.apng.
```
|
|
2021-12-20 12:35:30
|
|
|
2021-12-20 12:43:01
|
Created using `ffmpeg -pattern_type glob -i "*.png" test.apng`
|
|
|
_wb_
|
2021-12-20 03:21:09
|
we have some limitation in the current apng reader, maybe we should get rid of it because it's annoying
|
|
|
|
Deleted User
|
2021-12-23 10:46:53
|
<@!179701849576833024> Just curious, any specific reason you couldn't just copy & paste APNG support over to fjxl?
|
|
|
|
veluca
|
2021-12-23 10:56:27
|
not really
|
|
2021-12-23 10:56:42
|
just wanting to stick to single-image, single-file encoder 😛
|
|
|
|
Deleted User
|
2021-12-23 11:31:28
|
<@!179701849576833024> Are there noteworthy parts of fjxl that can be used for other modular JXLs? Like a faster lossy palette?
|
|
|
|
veluca
|
2021-12-23 11:32:38
|
modular jxl encoder performance is a bit of a dumpster fire 😛 even if you don't do tree learning, it's still quite worse than it could be
|
|
|
|
Deleted User
|
2021-12-25 08:16:56
|
<@!111445179587624960> Can you share a newer fjxl version that has veluca's train fix?
|
|
|
Scope
|
|
fab
|
2021-12-25 08:45:35
|
do you have it fo sse3
|
|
|
Traneptora
|
|
gnat
Created using `ffmpeg -pattern_type glob -i "*.png" test.apng`
|
|
2021-12-29 02:42:49
|
I find it's also possible to do `cat *.png | ffmpeg -f image2pipe -i - -f apng anim.apng`
|
|
|
veluca
modular jxl encoder performance is a bit of a dumpster fire 😛 even if you don't do tree learning, it's still quite worse than it could be
|
|
2021-12-29 02:43:30
|
"quite worse than it could be" sounds far better than "cannot be made faster"
|
|
|
gnat
Works except for APNG with transparency I get this.
```
cjxl ./test.apng output.jxl -v
JPEG XL encoder v0.6.1 0.6.1 [Scalar]
Corrupt or CMYK JPEG.
Failed to read image ./test.apng.
```
|
|
2021-12-29 02:44:23
|
veluca has a PR, wanna test it? https://github.com/libjxl/libjxl/pull/1058
|
|
|
|
Deleted User
|
|
Scope
|
|
2022-01-11 05:26:56
|
Feel free to share newer versions, should you build them.
|
|
|
Scope
|
|
Fox Wizard
|
2022-01-11 06:34:27
|
Lol, Windows Defender doesn't like that file <:KekDog:884736660376535040>
|
|
|
VEG
|
2022-01-13 06:53:34
|
Modern AV software don't like fresh unsigned executables.
|
|
2022-01-13 06:55:12
|
The SmartScreen is basically a thing which prevents you from running programs which were executed not frequently enough by many people.
|
|
2022-01-13 06:56:00
|
When enough people choose "run anyway" for a fresh program, it may consider to not prevent running the program.
|
|
2022-01-13 06:56:38
|
If you want to avoid this thing completely, you need an EV signature from an organization for that executable.
|
|
2022-01-13 06:57:17
|
If you have just a IV certificate (which is given to individual programmers) and sign your software with it, the SmartScreen still can complain and prevent your programs from running 😦
|
|
|
_wb_
|
2022-01-13 07:19:08
|
That seems like a crude way to detect malware. I would assume that either the threshold is low and it's easy for malware makers to get enough people to choose "run anyway", or the threshold is high and it becomes very annoying since a lot of legit software gets blocked
|
|
|
190n
|
2022-01-13 07:20:34
|
i imagine the threshold is high because most users probably don't run unsigned executables very often
|
|
2022-01-13 07:20:48
|
not to mention unsigned executables that a lot of other people don't also use
|
|
|
VEG
|
2022-01-13 07:25:51
|
Yeah, that's a horrible thing
|
|
2022-01-13 07:26:06
|
Some people trust it and don't run a program when it complains
|
|
2022-01-13 07:28:07
|
I consider buying an IV certificate for 10 years with hope that it will learn that software with my signature is never malware. As far as I know, it will complain when both your certificate and program are new, but when it learns about your signature a bit more, it should start to trust your software a bit more, so should be better.
|
|
2022-01-13 07:28:56
|
645$ for 10 years: https://www.ssl.com/certificates/code-signing/buy/
|
|
2022-01-13 07:30:13
|
But you need an EV signature to get instant trust from SmartScreen and similar stuff 😦 IV or OV should make it better, but not 100%.
|
|
|
improver
|
2022-01-13 07:34:57
|
sounds like scam business tbh
|
|
|
VEG
|
2022-01-13 07:38:47
|
It would be not that bad if the EV certificates were cheaper (now it is 250+$ a year https://www.ssl.com/certificates/ev-code-signing/buy/) and available for individual programmers.
|
|
2022-01-13 07:40:41
|
Sorry for the offtopic 🙂
|
|
2022-01-13 07:42:33
|
My website once even was banned by Google because some stupid AV considered one of my programs as suspicious, and a lot of other "security" software import data from Google Safe Browsing, so some sofware like Malwarebytes started to block my website completely.
|
|
2022-01-13 07:43:42
|
https://github.com/vrubleg/soundkeeper/commit/02b8f25dfbbd252a2ae6827dd0ee48a026ee534c
|
|
2022-01-13 07:43:53
|
I had to make this unnecessary change just to please Google
|
|
2022-01-13 07:45:58
|
All the requests to review their decision (with link to the source code, etc.) were automatically rejected. Only replacing the file with "less suspicious" version and waiting for some time helped. After this, I had to write to some companies like Malwarebytes to unban my website. Horrible experience. That's why I hate modern AV software.
|
|
2022-01-13 07:46:56
|
Sorry that I'm that talkative. I was triggered by that message related to SmartScreen. It is my sore spot 🙂
|
|
|
improver
|
2022-01-13 07:47:30
|
the joys of developing windows software
|
|
|
VEG
|
2022-01-13 07:48:21
|
It is even worse for MacOS. It is not that easy to install unsigned software there. You need to make a special dance for it 🙂
|
|
|
improver
|
2022-01-13 07:48:25
|
also probably good idea to have separate domain for binary distribution
|
|
|
The_Decryptor
|
2022-01-13 10:53:16
|
Last time I used a mac, double clicking on an unsigned app would produce an error, but right clicking and using open reduced it to a one time warning you could bypass
|
|
|
_wb_
|
2022-02-07 04:06:41
|
making progress on my lossless PSD to JXL recompression tool
|
|
2022-02-07 04:07:12
|
`Converted 75873293 byte PSD to 27718794 byte JPEG XL`
|
|
|
diskorduser
|
2022-02-07 06:31:32
|
encoding time?
|
|
|
_wb_
|
2022-02-07 06:49:34
|
This one was with -e 3
|
|
2022-02-07 06:51:11
|
The psd parsing code and stuff is not optimized yet, first need to make it correctly deal with at least all the cases that matter
|
|
2022-02-07 06:51:57
|
PSD is a very hairy format and it has many features, so just extracting the pixel data isn't that trivial
|
|
2022-02-07 06:52:46
|
(in the tool I also try to decode it again to PSD to verify that it actually roundtrips bit-exactly)
|
|
|
monad
|
2022-02-07 09:35:24
|
Unity engine supports PSD, but shipping a bunch of textures that way inflates the install size rather quickly. I wonder if JXL PSD recompression could slot into that use case.
|
|
|
_wb_
|
2022-02-10 09:30:25
|
Some results on lossless PSD recompression using general-purpose compression and using JXL:
Original set of 10 PSD files: 345.88 MB
Compressed with ZIP: 223.18 MB (takes 18 cpu seconds)
Compressed with brotli effort 4: 212.72 MB (takes 9 cpu seconds)
Compressed with brotli effort 7: 190.92 MB (takes 53 cpu seconds)
Compressed with brotli effort 8: 183.93 MB (takes 1m35s cpu time)
Compressed with brotli effort 10: 148.64 MB (takes 10m32s cpu time)
Compressed with jxl effort 2: 127.66 MB (takes 52 cpu seconds)
Compressed with jxl effort 3: 108.82 MB (takes 1m32s cpu time)
Compressed with jxl effort 7: 99.40 MB (takes 6m58s cpu time)
|
|
|
Fraetor
|
2022-02-10 10:03:20
|
Is this file exact lossless recompression, or just pixel exact?
|
|
|
_wb_
|
2022-02-10 10:45:35
|
File exact
|
|
2022-02-10 10:46:08
|
There is a lot of non-pixel stuff you also want to preserve in PSD files
|
|
2022-02-10 10:47:26
|
Pixel exact is even hard to define when there are things like layer fx
|
|
|
Fraetor
|
2022-02-10 10:59:55
|
Very true.
|
|
2022-02-10 11:02:07
|
That is pretty cool then. Its a little slow for directly saving, but could be nice for archiving.
|
|
|
BlueSwordM
|
|
Fraetor
That is pretty cool then. Its a little slow for directly saving, but could be nice for archiving.
|
|
2022-02-10 11:54:37
|
He did not tell us the size of the images.
|
|
|
Scope
|
2022-02-12 04:58:00
|
Yep, still not fast enough, especially for large projects and something like FJXL `-e 3` variant would also be useful for this use case (also for GIMP, PDF, etc. and also it may not always be photo-like content)
|
|
|
_wb_
|
2022-02-12 05:04:18
|
libjxl -e 2 is probably fast enough for this, memory is a bigger issue with libjxl encoding atm (it's using about 20 bytes per sample, so 80 bytes per pixel atm...)
|
|
|
Scope
|
2022-02-12 05:07:17
|
`-e 2` is something like 5 seconds on average per project, I think it is acceptable to have up to 2-3 seconds for compression (depending on the hardware and project size and also some time may be taken by other things besides compression), although this usually happens in the background, but still
For memory consumption, I think it would also be useful to have some sort of fastpaths for 8 (10/12/14 depending on format support) bits images
|
|
|
_wb_
|
2022-02-12 06:02:20
|
PSD only has 8, 16 and 32 bit
|
|
|
|
paperboyo
|
2022-02-12 06:04:32
|
Photoshop save operations are in the background and some PNG saves are **really** slow already. Just sayin’
|
|
|
_wb_
|
2022-02-12 06:11:18
|
we should at some point make an -e 2 that doesn't do global histograms but per-group ones; then it would perfectly parallelize and be a lot faster on a typical machine running Photoshop
|
|
|
|
Deleted User
|
2022-03-05 09:35:03
|
I'm looking for a way to convert existing images to jxl.
|
|
2022-03-05 09:35:37
|
Google search reveals shady websites.
|
|
|
Google search reveals shady websites.
|
|
2022-03-05 10:18:09
|
What? My Google search returned MConverter (which works and isn't shady for me) and jpegxl.io (author of which, <@439539398657441832>, is on this server) as first results.
|
|
|
I'm looking for a way to convert existing images to jxl.
|
|
2022-03-05 10:21:23
|
You can use squoosh.app by Google devs if you want to convert one by one in your browser (offline in WebAssembly, not server-side), or you can use an executable, write a batch script and do it natively without a browser and on a mass scale.
|
|
|
Justin
|
|
Google search reveals shady websites.
|
|
2022-03-05 10:23:03
|
Ey 😦 There's no Eminem on jpegxl.io ...unfortunately.
|
|
|
Olav
|
2022-03-05 10:26:42
|
XnConvert supposedly supports jpeg-xl now too.
https://www.xnview.com/en/xnconvert/
|
|
|
|
Deleted User
|
|
Justin
Ey 😦 There's no Eminem on jpegxl.io ...unfortunately.
|
|
2022-03-05 10:41:07
|
*Brub*
|
|
|
What? My Google search returned MConverter (which works and isn't shady for me) and jpegxl.io (author of which, <@439539398657441832>, is on this server) as first results.
|
|
2022-03-05 10:41:32
|
Oh ok
|
|
2022-03-05 10:44:29
|
I just oom'd on my phone lmao
|
|
2022-03-05 10:44:45
|
Ok maybe i should do this on pc
|
|
|
fab
|
2022-03-06 09:36:25
|
thee's no app
|
|
2022-03-06 09:36:30
|
only cmd command
|
|
2022-03-06 09:36:38
|
and the new encode is a demo
|
|
2022-03-06 09:36:56
|
https://chafey.github.io/libjxl-js/test/browser/index.html
|
|
2022-03-06 09:37:30
|
you need to wait libjxl 1.0
|
|
2022-03-06 09:37:35
|
and ffmpeg integation
|
|
2022-03-06 09:37:50
|
to be sue app like aves in a phone could ead jxl
|
|
2022-03-06 09:45:30
|
when you need it put this
|
|
2022-03-06 09:45:30
|
https://artifacts.lucaversari.it/libjxl/
|
|
2022-03-06 09:45:40
|
in a folde with the gui app
|
|
2022-03-06 09:45:49
|
jxl isn't still adopted
|
|
2022-03-06 09:46:16
|
|
|
2022-03-06 09:47:52
|
|
|
|
eddie.zato
|
2022-03-09 03:54:07
|
`PNG1 cjxl-> modularJXL djxl-> PNG2`
I get the icc profile in PNG2, how can I avoid this?
|
|
2022-03-09 03:57:40
|
I write an exif comment to PNG1 before encoding, if that matters, but only the comment, nothing else.
|
|
|
_wb_
|
2022-03-09 05:24:45
|
djxl always writes colorspace info in output pngs to make sure it's not ambiguous
|
|
2022-03-09 05:25:40
|
you can strip that with `convert PNG2 +profile * PNG3` or something like that iirc
|
|
2022-03-09 05:25:47
|
but why?
|
|
|
eddie.zato
|
2022-03-10 04:57:14
|
I have a bunch of important pngs that I encoded to lossless jxl. Then I decoded them to png and compared to the originals. Because of the icc profiles inside the resulting pngs and the originals don't match. So I have to strip the icc profiles from the resulting pngs before comparing. The images are hi-res and there are a lot of them, so it takes unnecessary extra time.
|
|
|
spider-mario
|
|
eddie.zato
I have a bunch of important pngs that I encoded to lossless jxl. Then I decoded them to png and compared to the originals. Because of the icc profiles inside the resulting pngs and the originals don't match. So I have to strip the icc profiles from the resulting pngs before comparing. The images are hi-res and there are a lot of them, so it takes unnecessary extra time.
|
|
2022-03-10 10:02:11
|
I thought https://github.com/libjxl/libjxl/pull/270 should have solved this, would you maybe have a pair of {original png, compressed jxl} to share for investigation?
|
|
|
eddie.zato
|
2022-03-10 01:29:24
|
<@!604964375924834314> I feel completely stupid. With today's `libjxl` I can't reproduce the problem on the same image as yesterday. `ssimulacra` finds no difference, but yesterday it showed 0.1
|
|
2022-03-10 01:33:38
|
I will try again to encode and compare a group of images. If `ssimulacra` finds differences between the original and the resulting png, I will share them.
|
|
|
spider-mario
|
2022-03-10 02:01:16
|
don’t beat yourself up, it doesn’t look like that PR has actually made it to a stable release yet
|
|
2022-03-10 02:01:44
|
so if you were using v0.6.1, it probably didn’t have that change
|
|
|
_wb_
|
|
eddie.zato
I will try again to encode and compare a group of images. If `ssimulacra` finds differences between the original and the resulting png, I will share them.
|
|
2022-03-10 02:26:58
|
which ssimulacra are you using? the one from libjxl is fine, the original one ignores colorspace info and assumes input is sRGB, so that won't help you
|
|
|
eddie.zato
|
2022-03-10 02:32:45
|
I use the latest git version of `libjxl` tools, which I build myself almost every day, including `ssimulacra`.
|
|
2022-03-10 02:43:47
|
Besides the fact that yesterday `ssimulacra` showed a difference of 0.1, the resulting png was also displayed in Edge with a brightness different from the original image. But when I removed the icc profile, the images became the same.
|
|
2022-03-10 02:44:10
|
I need more tests with more images to be sure.
|
|
|
spider-mario
|
|
eddie.zato
Besides the fact that yesterday `ssimulacra` showed a difference of 0.1, the resulting png was also displayed in Edge with a brightness different from the original image. But when I removed the icc profile, the images became the same.
|
|
2022-03-10 02:52:08
|
what is likely happening is that it was (incorrectly) ignoring the gAMA chunk in the original PNG, but (correctly) taking the equivalent ICC profile into account in the decoded image
|
|
2022-03-10 02:52:40
|
the change in #270 makes it so that it’s at least consistently (in)correct at both ends
|
|
|
damian101
|
|
Olav
XnConvert supposedly supports jpeg-xl now too.
https://www.xnview.com/en/xnconvert/
|
|
2022-04-26 09:36:47
|
but it doesn't...
|
|
|
|
Deleted User
|
2022-04-27 03:22:54
|
I saw that someone was looking for help with batch conversion of images (like a month or two ago lol) in another channel, so I wanted to share my batch script in case it helps anyone. Depends on ImageMagick, and `convert` being on your path.
```bat
@echo off
REM run convert -version to raise the ERRORLEVEL if 'convert' is not found
echo Searching for convert (from ImageMagick)
convert -version
REM convert was not found
if ERRORLEVEL 1 (
echo convert was not found on your PATH.
echo Please install ImageMagick and add convert.exe to your PATH.
REM Exit the batch script
exit /B 1
)
REM Definitely I missed some file types, if it's not converting (insert
REM image format here), add the extension here.
for %%G in (.jpg, .jpeg, .jfif, .tiff, .png, .webp, .bmp) do (
echo converting %%G files...
REM Loop over files in this directory and convert them all to jxl.
REM Your homework is to make this recurse if you're looking for that.
forfiles /M *%%G /c "cmd /c convert @file @fname.jxl"
)
```
|
|
|
|
Hello71
|
2022-04-27 01:48:05
|
it seems reasonable but i think it won't work for file names containing whitespace
|
|
2022-04-27 01:53:29
|
i think in powershell it should be something like `get-childitem -include *.jpg -include *.jpeg -file | foreach-object convert $_.fullname $([System.IO.Path]::ChangeExtension($_.fullname,".jxl"))`
|
|
2022-04-27 01:53:42
|
then just stick a -recurse on the front if you want that
|
|
2022-04-27 01:54:50
|
also afaik there's no need for cmd /c there
|
|
|
eddie.zato
|
2022-04-27 03:26:53
|
pwsh7
```PowerShell
ls *.jpg,*.jpeg -af | % -ThrottleLimit 4 -Parallel { cjxl --quiet $_.FullName ($_.FullName -replace '\.jpe?g$','.jxl') }
```
|
|
|
|
Deleted User
|
2022-04-27 04:20:00
|
works for files with ws in name
|
|
2022-04-27 04:21:19
|
think it's because * will select anything with ws and honestly I'm ngl I don't know why @fname works. Maybe it subs in quotes if it's got whitespace in it already?
|
|
|
Traneptora
|
2022-04-27 04:25:12
|
~~perhaps batch doesn't require you to quote every expansion like SH~~
|
|
|
BlueSwordM
|
2022-04-29 12:45:12
|
<@853026420792360980> Basically, I'm trying to take high bit depth screenshots inside of mpv, but it's not working according to jxlinfo(and the fact that a JXL compressed PNG is quite a bit larger):
https://cdn.discordapp.com/attachments/652991792106438686/969398784419332096/mpv-shot0001.png
```jxlinfo /home/bluezakm/mpv-screenshots/mpv-shot0001.jxl
JPEG XL file format container (ISO/IEC 18181-2)
JPEG XL image, 1920x1080, (possibly) lossless, 8-bit RGBA
Color space: RGB, D65, sRGB primaries, sRGB transfer function, rendering intent: Relative
frame: full image size```
HBD version of that image compressed by JXL:
https://cdn.discordapp.com/attachments/652991792106438686/969401463967211590/mpv-shot0002.jxl
```jxlinfo /home/bluezakm/mpv-screenshots/mpv-shot0002.jxl
JPEG XL image, 1920x1080, (possibly) lossless, 16-bit RGB
Color space: RGB, D65, sRGB primaries, sRGB transfer function, rendering intent: Perceptual
frame: full image size```
mpv config:
```screenshot-format=jxl
screenshot-jxl-distance=0
screenshot-directory=/home/bluezakm/mpv-screenshots/
screenshot-tag-colorspace=yes
screenshot-high-bit-depth=yes```Git everything: mpv, ffmpeg, libjxl.
|
|
2022-04-29 12:46:49
|
Sorry, it's just that I think this is a better place than IRC to discuss about this.
|
|
|
_wb_
|
2022-04-29 12:54:19
|
Does the ffmpeg jxl integration set the bitdepth in the basicinfo?
|
|
2022-04-29 12:56:37
|
One potential confusion is that passing data as uint16 will automatically encode the data as uint16. It doesn't. The data will be encoded as set in the basicinfo. The pixelformat for buffer passing is just for passing the buffer, so you can encode 1-bit images by using float buffers if you want, or even the other way around.
|
|
|
BlueSwordM
|
2022-04-29 01:01:25
|
I'm not sure on that.
|
|
2022-04-29 02:15:26
|
Anyway, I think I found a way to fix it.
|
|
|
Traneptora
|
|
_wb_
Does the ffmpeg jxl integration set the bitdepth in the basicinfo?
|
|
2022-04-29 02:36:07
|
yes, but the issue here is that it declares what pixel formats it supports
|
|
2022-04-29 02:36:19
|
so it declares that it supports rgba64
|
|
2022-04-29 02:36:45
|
if it declared that it supported 10-bit RGB then it would have to convert it via swscale before feeding it to libjxl
|
|
2022-04-29 02:36:52
|
since libjxl realistically only supports 8-bit and 16-bit input
|
|
|
BlueSwordM
<@853026420792360980> Basically, I'm trying to take high bit depth screenshots inside of mpv, but it's not working according to jxlinfo(and the fact that a JXL compressed PNG is quite a bit larger):
https://cdn.discordapp.com/attachments/652991792106438686/969398784419332096/mpv-shot0001.png
```jxlinfo /home/bluezakm/mpv-screenshots/mpv-shot0001.jxl
JPEG XL file format container (ISO/IEC 18181-2)
JPEG XL image, 1920x1080, (possibly) lossless, 8-bit RGBA
Color space: RGB, D65, sRGB primaries, sRGB transfer function, rendering intent: Relative
frame: full image size```
HBD version of that image compressed by JXL:
https://cdn.discordapp.com/attachments/652991792106438686/969401463967211590/mpv-shot0002.jxl
```jxlinfo /home/bluezakm/mpv-screenshots/mpv-shot0002.jxl
JPEG XL image, 1920x1080, (possibly) lossless, 16-bit RGB
Color space: RGB, D65, sRGB primaries, sRGB transfer function, rendering intent: Perceptual
frame: full image size```
mpv config:
```screenshot-format=jxl
screenshot-jxl-distance=0
screenshot-directory=/home/bluezakm/mpv-screenshots/
screenshot-tag-colorspace=yes
screenshot-high-bit-depth=yes```Git everything: mpv, ffmpeg, libjxl.
|
|
2022-04-29 02:37:13
|
what do you mean by "it's not working"
|
|
|
BlueSwordM
|
|
Traneptora
what do you mean by "it's not working"
|
|
2022-04-29 02:37:28
|
It doesn't encode to high bit depth.
|
|
|
Traneptora
|
2022-04-29 02:37:39
|
that looks like it's doing exactly what is intended
|
|
|
BlueSwordM
It doesn't encode to high bit depth.
|
|
2022-04-29 02:38:14
|
`screenshot-high-bit-depth=yes` does that provided that the input is > 8 bits
|
|
|
BlueSwordM
|
|
Traneptora
`screenshot-high-bit-depth=yes` does that provided that the input is > 8 bits
|
|
2022-04-29 02:38:23
|
Yeah, but the input is indeed >8b(10b).
|
|
|
Traneptora
|
2022-04-29 02:38:34
|
post a sample
|
|
2022-04-29 02:38:42
|
because I tested that and it works
|
|
|
BlueSwordM
|
|
Traneptora
because I tested that and it works
|
|
2022-04-29 02:41:19
|
Here's another small sample you can test with.
Output that libjxl gives me(first frame):
|
|
|
Traneptora
|
|
BlueSwordM
Here's another small sample you can test with.
Output that libjxl gives me(first frame):
|
|
2022-04-29 02:45:43
|
appears to be an mpv bug
|
|
2022-04-29 02:45:50
|
setting `screenshot-sw=yes` makes it work properly
|
|
2022-04-29 02:47:27
|
note that if you have `screenshot-sw=no` then it uses `rgba64be` for the PNG, and with `yes` it uses `rgb48be`
|
|
|
BlueSwordM
|
|
Traneptora
note that if you have `screenshot-sw=no` then it uses `rgba64be` for the PNG, and with `yes` it uses `rgb48be`
|
|
2022-04-29 02:47:50
|
It might be this conditional return that is the issue:
https://github.com/mpv-player/mpv/blob/master/video/image_writer.c#L326
```bool image_writer_high_depth(const struct image_writer_opts *opts)
{
return opts->format == AV_CODEC_ID_PNG;
}```
|
|
|
Traneptora
|
2022-04-29 02:48:30
|
the think you linked doesn't show what you probably want it to show
|
|
2022-04-29 02:48:42
|
that's just my commit
|
|
|
BlueSwordM
|
|
Traneptora
that's just my commit
|
|
2022-04-29 02:49:27
|
Fixed:
https://github.com/mpv-player/mpv/blob/master/video/image_writer.c#L326
|
|
2022-04-29 02:51:23
|
I had planned to do a very quick PR with this change but I wanted to check with you first if it was the right way to do it:
```diff
diff --git a/video/image_writer.c b/video/image_writer.c
index d12394a5a9..e01cc837f4 100644
--- a/video/image_writer.c
+++ b/video/image_writer.c
@@ -325,7 +325,7 @@ const char *image_writer_file_ext(const struct image_writer_opts *opts)
bool image_writer_high_depth(const struct image_writer_opts *opts)
{
- return opts->format == AV_CODEC_ID_PNG;
+ return opts->format == AV_CODEC_ID_PNG || AV_CODEC_ID_JPEGXL;
}```
|
|
|
Traneptora
|
2022-04-29 02:51:47
|
well that doesn't work
|
|
2022-04-29 02:51:57
|
even if it compiles
|
|
2022-04-29 02:52:51
|
```
return opts->format == AV_CODEC_ID_PNG ||
opts->format == AV_CODEC_ID_JPEGXL;
```
|
|
2022-04-29 02:53:19
|
you'd also have to guard it with the appropriate ifdefs
|
|
2022-04-29 02:53:25
|
I can raise a PR for this, gimme a sec
|
|
2022-04-29 02:53:31
|
in the short term you can just use `screenshot-sw=yes`
|
|
2022-04-29 02:53:34
|
which works as expected
|
|
2022-04-29 04:06:08
|
<@321486891079696385>
https://github.com/mpv-player/mpv/pull/10147
|
|
|
BlueSwordM
|
|
Traneptora
<@321486891079696385>
https://github.com/mpv-player/mpv/pull/10147
|
|
2022-04-29 04:14:16
|
It works!
Everything LGTM 😄
|
|
|
decryption
|
2022-05-16 02:30:22
|
hello! anyone been able to use the cjxl tool in Linux with GNU Parallel?
|
|
2022-05-16 02:30:25
|
just to speed things up
|
|
|
BlueSwordM
|
|
decryption
just to speed things up
|
|
2022-05-16 02:31:17
|
Yes:
`(find -type f -name '*.png') | parallel cjxl {} {.}.jxl --num_threads 2`
|
|
|
decryption
|
2022-05-16 02:31:29
|
<@321486891079696385> thank you 🙂
|
|
|
|
Hello71
|
2022-05-16 02:54:35
|
it will not necessarily be faster
|
|
|
BlueSwordM
|
|
Hello71
it will not necessarily be faster
|
|
2022-05-16 03:24:15
|
It will be faster.
|
|
2022-05-16 03:24:31
|
Per file threading is always faster since it has practically infinite scaling.
|
|
|
Traneptora
|
2022-05-16 04:08:01
|
it's usually better to set `--num_threads 0` when using gnu parallel
|
|
2022-05-16 04:08:10
|
which disables threading
|
|
|
Eugene Vert
|
2022-05-16 05:33:27
|
Did a quick benchmark to check efficiency of `--num_threads 0` (results are an average of 3 runs, files on tmpfs)
Having 4-core 4-threads CPU, it indeed seems better to run `--num_threads 0` with `-j ${cpu_count}` jobs in parallel
|
|
|
|
Hello71
|
|
BlueSwordM
Per file threading is always faster since it has practically infinite scaling.
|
|
2022-05-17 01:47:32
|
if you totally ignore caching.
|
|
|
Traneptora
|
|
Eugene Vert
Did a quick benchmark to check efficiency of `--num_threads 0` (results are an average of 3 runs, files on tmpfs)
Having 4-core 4-threads CPU, it indeed seems better to run `--num_threads 0` with `-j ${cpu_count}` jobs in parallel
|
|
2022-05-17 02:09:46
|
just so you know, num_threads=1 is basically the same as num_threads=0
|
|
2022-05-17 02:10:24
|
if `num_threads=N` where `N > 0` what it does is it creates `N` worker threads and one control thread which doesn't do decoding, just coordinates
|
|
2022-05-17 02:10:30
|
whereas `0` just disables threading
|
|
2022-05-17 02:10:47
|
so for `N=1` you end up with one control and one worker, which has no gain over just not threading
|
|