Bug 2388961 - glycin backend saving jpg format with alpha channel does not work at all
Summary: glycin backend saving jpg format with alpha channel does not work at all
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: gdk-pixbuf2
Version: 43
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: RejectedBlocker RejectedFreezeException
: 2403337 (view as bug list)
Depends On:
Blocks: 2389370
TreeView+ depends on / blocked
 
Reported: 2025-08-16 14:50 UTC by Mamoru TASAKA
Modified: 2025-10-13 14:01 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
sun.jpg taken from xplanet (8.61 KB, image/jpeg)
2025-08-16 14:51 UTC, Mamoru TASAKA
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNOME Gitlab GNOME gdk-pixbuf issues 268 0 None closed Internal error: The encoder or decoder for Jpeg does not support the color type `Rgba8` 2025-09-30 14:15:34 UTC

Description Mamoru TASAKA 2025-08-16 14:50:22 UTC
Looks like just loading jpg file and saving it as it is does not work with gdk-pixbuf2-2.43.3-5.fc43.x86_64

Just see the following sample code:

```
$ cat gdk-pixbuf-jpg-test.c
#include <glib.h>
#include <glib/gprintf.h>
#include <gdk-pixbuf/gdk-pixbuf.h>

int main(void) {
	GError *err = NULL;

	GdkPixbuf *buf = gdk_pixbuf_new_from_file ("sun.jpg", &err);
	g_assert_no_error (err);

	gboolean has_alpha = gdk_pixbuf_get_has_alpha(buf);
	g_printf("has_alpha: %d\n", (int)has_alpha);

	gdk_pixbuf_save(buf, "sun2.jpg", "jpeg", &err, NULL);
	g_assert_no_error (err);
}

$ gcc $(rpm --eval %optflags) $(pkg-config --cflags --libs gdk-pixbuf-2.0) $(pkg-config --cflags --libs glib-2.0) -o gdk-pixbuf-jpg-test{,.c} && ./gdk-pixbuf-jpg-test 
has_alpha: 1
**
ERROR:gdk-pixbuf-jpg-test.c:15:main: assertion failed (err == NULL): Remote error: org.gnome.glycin.Error.InternalEditorError: loaders/glycin-image-rs/src/editor.rs:123:22: Internal error: The encoder or decoder for Jpeg does not support the color type `Rgba8` (gly-loader-error, 0)
Bail out! ERROR:gdk-pixbuf-jpg-test.c:15:main: assertion failed (err == NULL): Remote error: org.gnome.glycin.Error.InternalEditorError: loaders/glycin-image-rs/src/editor.rs:123:22: Internal error: The encoder or decoder for Jpeg does not support the color type `Rgba8` (gly-loader-error, 0)
中止                     (コアダンプ) ./gdk-pixbuf-jpg-test
```

Note that "has_alpha" says 1 (even if the input file is jpeg), and saving jpg file as it is fails.

gdk-pixbuf2-2.43.3-5.fc43.x86_64
glycin-libs-2.0~alpha.6-3.fc43.x86_64


Reproducible: Always



Expected Results:
With Fedora 42 gdk-pixbuf2-2.42.12-12.fc42.x86_64 :

$ gcc $(rpm --eval %optflags) $(pkg-config --cflags --libs gdk-pixbuf-2.0) $(pkg-config --cflags --libs glib-2.0) -o gdk-pixbuf-jpg-test{,.c} && ./gdk-pixbuf-jpg-test 
has_alpha: 0


... and no errors

Comment 1 Mamoru TASAKA 2025-08-16 14:51:40 UTC
Created attachment 2103837 [details]
sun.jpg taken from xplanet

Very simple jpg file from xplanet

Comment 2 Elliott Sales de Andrade 2025-08-21 02:22:39 UTC
Looks like https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/219 but it's not in a release yet.

Comment 3 Fedora Blocker Bugs Application 2025-09-25 17:56:40 UTC
Proposed as a Blocker and Freeze Exception for 43-final by Fedora user augenauf using the blocker tracking app because:

 Default application functionality

Comment 4 Adam Williamson 2025-09-25 18:07:44 UTC
Out of the list of blocking applications:

    web browser
    file manager
    package manager
    image viewer
    document viewer
    text editor
    archive manager
    terminal emulator
    problem reporter
    help viewer
    system settings

which of them have "basic functionality" broken by this bug?

Comment 5 Matthias Clasen 2025-09-27 12:53:55 UTC
Saving jpeg works. But jpeg has no support for transparency, so saving pixbufs with alpha to jpeg fails.

The commit you refer to has been in releases for a while

Comment 6 Karolina Surma 2025-09-29 14:21:09 UTC
Hello. This is a bulk comment.

This package still needs to be rebuilt and/or shipped with Python 3.14.0rc3+ bytecode in Fedora 43.

The Final Freeze of Fedora 43 is scheduled to start next week. Please prioritize this bugzilla accordingly.

Thanks.

Comment 7 Adam Williamson 2025-09-29 15:17:05 UTC
-6 in https://pagure.io/fedora-qa/blocker-review/issue/1949 , marking rejected blocker. FE vote still open.

Comment 8 Adam Williamson 2025-09-29 16:20:25 UTC
> Saving jpeg works. But jpeg has no support for transparency, so saving pixbufs with alpha to jpeg fails.

Then...how do we get a pixbuf with transparency by *loading* a JPEG?

Comment 9 Neal Gompa 2025-09-29 16:28:20 UTC
You could if it started out as JPEG XL. It's a superset of JPEG but is expected to be parseable by classic JPEG codecs.

Comment 10 Lukas Ruzicka 2025-09-29 17:27:53 UTC
AGREED Delayed decision (punt)

Discussed at the 2025-09-29 (blocker / freeze exception) review meeting:

We felt like this could potentially be something with enough of an impact to justify a FreezeException, but nobody has yet demonstrated such impact. We agreed to punt to give folks a chance to demonstrate a problem in a typical pre-install/pre-update use case.

https://meetbot-raw.fedoraproject.org//blocker-review_matrix_fedoraproject-org/2025-09-29/f43-blocker-review.2025-09-29-16.03.txt

Comment 11 Matthias Clasen 2025-09-30 13:45:39 UTC
Relevant discussion in this upstream issue: https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/268

Comment 12 Matthias Clasen 2025-09-30 19:42:44 UTC
Please retry with gdk-pixbuf 2.44.3. We can't reproduce the problem with current glycin and gdk-pixbuf versions.

Comment 13 Lukas Ruzicka 2025-10-06 18:42:41 UTC
AGREED RejectedFinalFreezeException

Discussed at the 2025-10-06 (blocker / freeze exception) review meeting:

There's still been no clear rationale for why this bug as described would justify a freeze exception. We will reconsider this decision if any such justification appears.

https://meetbot-raw.fedoraproject.org//blocker-review_matrix_fedoraproject-org/2025-10-06/f43-blocker-review.2025-10-06-16.00.txt

Comment 14 Mamoru TASAKA 2025-10-07 13:43:29 UTC
Note that my "original" report is (was( that (as you can see on https://bugzilla.redhat.com/show_bug.cgi?id=2388961#c0 )

Even loading jpeg file, then saving it "as it is" fails (failed).

So (In reply to Matthias Clasen from comment #5)
> Saving jpeg works. But jpeg has no support for transparency, so saving
> pixbufs with alpha to jpeg fails.

Again:
the original bug was, as jpeg has no support for transparency, 
after loading jpeg, pixbuf should say "no alpha", but 
(as I said in the first comment) even after loading jpeg, pixbuf says (said)

> Note that "has_alpha" says 1 (even if the input file is jpeg)

and this is (was) also wrong (as gdk-pixbuf2-2.42.12 said, generated pixbuf should say "no alpha"), 
and saving the pixbuf to jpeg was not working.

So this summary changing:
> Summary: glycin backend saving jpg format does not work at all → glycin backend saving jpg format with alpha channel does not work at all
is really not what I reported.

Then: the original bug I reported seems to be already fixed. Not sure if glycin backend saving jpg format "with alpha" channel works now.

Comment 15 Michael Catanzaro 2025-10-13 14:01:52 UTC
*** Bug 2403337 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.