Skip to content

Work around errors saving JPEG files with the glycin pixbuf loader#1785

Merged
cameronwhite merged 1 commit into
masterfrom
fix/glycin-jpeg
Oct 4, 2025
Merged

Work around errors saving JPEG files with the glycin pixbuf loader#1785
cameronwhite merged 1 commit into
masterfrom
fix/glycin-jpeg

Conversation

@cameronwhite

Copy link
Copy Markdown
Member

This requires explicitly converting to a Gdk.Pixbuf which doesn't contain alpha.

Bug: #1774

This requires explicitly converting to a Gdk.Pixbuf which doesn't contain alpha.

Bug: #1774
@Piscium

Piscium commented Oct 2, 2025

Copy link
Copy Markdown

I built from your branch but sadly it did not fix the issue for me.
I am on Arch with the the most recent version of gdk-pixbuf2 installed (2.44.3).
What I used in the build:

source=("https://github.com/PintaProject/Pinta/archive/refs/heads/fix/glycin-jpeg.zip")

GLib.GException: Remote error: org.gnome.glycin.Error.InternalEditorError: glycin-loaders/glycin-image-rs/src/editor.rs:129:22: Internal error: The encoder or decoder for Jpeg does not support the color type `Rgba8`

stderr:
Setting process memory limit

   at GdkPixbuf.Pixbuf.SaveToStreamv(OutputStream stream, String type, String[] optionKeys, String[] optionValues, Cancellable cancellable)
   at Pinta.Core.JpegFormat.DoSave(Pixbuf pb, File file, String fileType, Window parent)
   at Pinta.Core.GdkPixbufFormat.Export(Document document, File file, Window parent)
   at Pinta.Actions.SaveDocumentImplmentationAction.SaveFile(Document document, File file, FormatDescriptor format, Window parent)
   at Pinta.Actions.SaveDocumentImplmentationAction.SaveFileAs(Document document)
   at Pinta.Actions.SaveDocumentImplmentationAction.Activated(Object sender, DocumentCancelEventArgs e)
   at Pinta.Core.FileActions.RaiseSaveDocument(Document document, Boolean saveAs)
   at Pinta.Core.Document.Save(Boolean saveAs)
   at Pinta.Actions.SaveDocumentAsAction.Activated(Object sender, EventArgs e)
   at Pinta.Core.Command.<.ctor>b__29_0(SimpleAction o, ActivateSignalArgs args)
   at GObject.Closure.InternalCallback(IntPtr closure, IntPtr returnValuePtr, UInt32 nParamValues, IntPtr paramValuesData, IntPtr invocationHint, IntPtr userData)

@cameronwhite

Copy link
Copy Markdown
Member Author

I built from your branch but sadly it did not fix the issue for me. I am on Arch with the the most recent version of gdk-pixbuf2 installed (2.44.3). What I used in the build:

Hmm, that's interesting. I was testing on a VM with CachyOS (Arch-based) which is on gdk-pixbuf2 2.44.3-1.1, and this did work for me

It sounds like you downloaded the zip - were you running the Makefiles to build and install It on your system, or just running dotnet run --project Pinta?
If it's the former, maybe double check that you actually replaced whatever old version was installed?

@Piscium

Piscium commented Oct 3, 2025

Copy link
Copy Markdown

There was an error in my PKGBUILD. I will rebuild and retest later. Sorry for the noise.

@Piscium

Piscium commented Oct 3, 2025

Copy link
Copy Markdown

PKGBUILD fixed. I have done only a 30 seconds test of the issue at hand, namely, the saving of a file in jpeg, and it works.
Thanks for finding a fix!

@cameronwhite

Copy link
Copy Markdown
Member Author

Great, thanks for confirming!

@cameronwhite cameronwhite merged commit 898d367 into master Oct 4, 2025
13 checks passed
@cameronwhite cameronwhite deleted the fix/glycin-jpeg branch December 24, 2025 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants