Is JPEG-XL DOA? Topic is solved

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Is JPEG-XL DOA?

Unread post by BenFenner » 2022-12-01, 15:16

Ahh, my apologies then for jumping to "bug" conclusion. I guess I could have inspected the MIME type. Thank you both for the reality check.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Is JPEG-XL DOA?

Unread post by Moonchild » 2022-12-01, 15:30

You're fine :) I was equally confused when implementing it and thought it was a bug, up to the point I checked the MIME type.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Is JPEG-XL DOA?

Unread post by BenFenner » 2022-12-02, 16:07

RealityRipple wrote:
2022-12-01, 06:21
Weirdly enough, that's not a bug, it's expected behavior. They're serving that file as application/octet-stream. Try http://demos.webmproject.org/webp/cmp/2022_10_04/comparisonfiles/subset1/small/JXL/08-2011._Panthera_tigris_tigris_-_Texas_Park_-_Lanzarote_-TP04.jxl instead. It's served as image/jxl as it should be.
Finally got Pale Moon version 31.4.1 (64-bit) on this machine (happens to be Linux Mint) to try that link and I'm still being presented with the download file dialog box.
Let me go try a Windows machine...

Hmm, works properly on Windows. Let me restart my Linux machine and report back.

Edit: Still no dice on Linux. Quite interesting... Maybe worth looking into further?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Is JPEG-XL DOA?

Unread post by Moonchild » 2022-12-02, 16:46

BenFenner wrote:
2022-12-02, 16:07
Finally got Pale Moon version 31.4.1 (64-bit) on this machine (happens to be Linux Mint) to try that link and I'm still being presented with the download file dialog box.
Which Linux builds are you using? Mainline universal build from linux.palemoon.org? Package from a local package manager? Steve Pusser's builds? Or built from source?
If you go to https://jpegxl.info/ does it indicate support or not?
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Is JPEG-XL DOA?

Unread post by BenFenner » 2022-12-02, 22:07

Let me know if I should, and I'll create a new thread for this.

I thought I was using Steve Pusser's builds, but I'll say for sure it gets updated through my local package manager which calls itself mintUpdate but I'm assuming uses apt-get in the background. For sure it's not built from source on my machine. It might ultimately come from mainline linux.palemoon.org but that is beyond me.
If there is a way to tell for sure, I'm all ears. (I'm much more comfortable in MS Windows, as sad as that sounds.)

As for https://jpegxl.info/ I would have thought I'd been there before on this specific machine, but I guess not. It indicates my copy of Pale Moon version 31.4.1 (64-bit) does not support JPEG-XL. Excellent test. So now we know something very odd is going on with my version of PM. I'm happy to help now that we know more. Just let me know what to do.

dbsoft
Project Contributor
Project Contributor
Posts: 405
Joined: 2020-02-21, 17:35

Re: Is JPEG-XL DOA?

Unread post by dbsoft » 2022-12-02, 23:59

If it is someone just doing builds for that platform, they need to add --enable-jxl to the build configuration to get that support. I assume about:buildconfig will not show --enable-jxl?

BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Is JPEG-XL DOA?

Unread post by BenFenner » 2022-12-03, 00:41

You're correct, it seems who ever is building the application did not enable that config option.

Searchable text verion:
about:buildconfig
Build platform
target
x86_64-pc-linux-gnu
Build tools
Compiler Version Compiler flags
/usr/bin/gcc -std=gnu99 9.3.0 -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=multistatement-macros -flifetime-dse=1 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -fno-strict-aliasing -ffunction-sections -fdata-sections -fno-math-errno -pipe -msse2 -mfpmath=sse -pthread
/usr/bin/g++ -std=gnu++11 9.3.0 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wc++1z-compat -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=multistatement-macros -flifetime-dse=1 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pipe -msse2 -mfpmath=sse -pthread -g -O2 -w -fomit-frame-pointer -Wdate-time -D_FORTIFY_SOURCE=2
Configure options

--enable-application=palemoon --with-external-source-dir=/usr/src/packages/BUILD --enable-jemalloc --enable-default-toolkit=cairo-gtk2 MAKE=make --enable-av1 --enable-devtools --disable-eme --disable-gamepad --disable-necko-wifi --enable-official-branding --enable-official-vendor '--enable-optimize=-O2 -w' --enable-strip --disable-tests --disable-updater --disable-webrtc --prefix=/usr --with-pthreads --x-libraries=/usr/lib
Image

User avatar
jobbautista9
Keeps coming back
Keeps coming back
Posts: 780
Joined: 2020-11-03, 06:47
Location: Philippines
Contact:

Re: Is JPEG-XL DOA?

Unread post by jobbautista9 » 2022-12-20, 07:28

Moonchild wrote:
2022-11-22, 20:11
I'm not sure why people jump to using JS for everything.
There is this thing called "content negotiation" (aka "conneg") which is and has been a standard part of HTML that does not need scripting to determine what a client accepts.
Some people in the Google corner have (predictably) tried to snuff it but it's too powerful™ so it has survived the assault.
Basically, conneg sends a header to the server which mime types are accepted for the request, and the server can easily serve up appropriate content as a result.
Our JPEG-XL support is advertised to servers this way through the image.http.accept pref which advertises specific support for webp (and now also jxl) as well as png, explicitly, before a fallback value (basically telling the server "if not any of these, then use whatever you have" which normally means formats everyone and their grandmother supports). Servers can easily check this header to see whether a client supports a specific image format and serve the appropriate response, accordingly.
I do realize there's a non-JS way to do it, but what if I don't own the server for example? I can use the <picture> and <source> tags to serve JPEG-XL images with a PNG fallback as shown in http://rw.rs/~job/writings/everything2/cyndaquil3.html, but I don't know of an equivalent, working way for CSS background-image which ensures the browser will load only one image (and load only the fallback when it fails to decode the first option). Apparently there's now image-set() for that, but we don't support this yet...
Image

merry mimas

XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.

Mima avatar by 絵虎. Pixiv post: https://www.pixiv.net/en/artworks/15431817

Image

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Is JPEG-XL DOA?

Unread post by Moonchild » 2022-12-20, 08:11

If you have that little control over your server in 2022 then you may want to consider hopping service provider.
Just saying ;-)

As for the background-image corner case I haven't looked into details, but I have to wonder if JPEG-XL is a good candidate for that to begin with, so short after its introduction. Either way, it needs time.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Is JPEG-XL DOA?

Unread post by BenFenner » 2023-01-25, 23:15

I have a follow-up to my posts above. Seems whoever is building the PM release I'm using on Linux Mint finally got with the JXL program and the option is now enabled for the build.
All looks good here as well: https://jpegxl.info/test-page

:D

about:buildconfig output:
about:buildconfig
Build platform
target
x86_64-pc-linux-gnu
Build tools
Compiler Version Compiler flags
/usr/bin/gcc -std=gnu99 9.3.0 -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=multistatement-macros -flifetime-dse=1 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -fno-strict-aliasing -ffunction-sections -fdata-sections -fno-math-errno -pipe -msse2 -mfpmath=sse -pthread
/usr/bin/g++ -std=gnu++11 9.3.0 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wc++1z-compat -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=multistatement-macros -flifetime-dse=1 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pipe -msse2 -mfpmath=sse -pthread -g -O2 -w -fomit-frame-pointer -Wdate-time -D_FORTIFY_SOURCE=2
Configure options

--enable-application=palemoon --with-external-source-dir=/usr/src/packages/BUILD --enable-jemalloc --enable-default-toolkit=cairo-gtk2 MAKE=make --enable-av1 --enable-jxl --enable-devtools --disable-eme --disable-gamepad --disable-necko-wifi --enable-official-branding --enable-official-vendor '--enable-optimize=-O2 -w' --enable-strip --disable-tests --disable-updater --disable-webrtc --prefix=/usr --with-pthreads --x-libraries=/usr/lib

User avatar
Navigator
Moon lover
Moon lover
Posts: 98
Joined: 2023-02-24, 17:53

Re: Is JPEG-XL DOA?

Unread post by Navigator » 2023-03-25, 17:48

BenFenner wrote:
2023-01-25, 23:15
I have a follow-up to my posts above. Seems whoever is building the PM release I'm using on Linux Mint finally got with the JXL program and the option is now enabled for the build.
All looks good here as well: https://jpegxl.info/test-page
When I right-click and select "View Image" on the other three formats I get just the image in its own window. When I do that on the JXL image I get a "What should Pale Moon do with this file?" dialog. Can I make that open natively like the other image formats?

BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Is JPEG-XL DOA?

Unread post by BenFenner » 2023-03-25, 17:52

I believe that situation has already been discussed in this thread, and things are working as expected. Begin reading from here:
viewtopic.php?f=5&t=29099#p234357


I'll also say, related to my other posts here. I know now for sure I'm using the Steven Pusser releases. Not sure why he forgot to enable the build flag a while back, but no big deal. Had I known who to ping at the time I would have.

User avatar
RealityRipple
Astronaut
Astronaut
Posts: 644
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California
Contact:

Re: Is JPEG-XL DOA?

Unread post by RealityRipple » 2023-03-26, 02:44

Yep, that host is serving the file as "application/octet-stream", which, when loaded individually, results in a download prompt because the server says to handle it as binary data, not an image.

Locked