summaryrefslogtreecommitdiff
path: root/src/photos/JfifSupport.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2026-03-08 11:11:41 +0100
committerJörg Frings-Fürst <debian@jff.email>2026-03-08 11:11:41 +0100
commit360a72d4363f513a3acaebb084ab39fe3ff22832 (patch)
treeb3d41d58cbb1d52e3871e40258539ac760cd265e /src/photos/JfifSupport.vala
parentfa4d70ea3101f5a70b33977ba9b7673ddfb36762 (diff)
parent1ef9b86df1cca6dde71529f03b66407953d000c9 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/photos/JfifSupport.vala')
-rw-r--r--src/photos/JfifSupport.vala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/photos/JfifSupport.vala b/src/photos/JfifSupport.vala
index fc43663..ceca827 100644
--- a/src/photos/JfifSupport.vala
+++ b/src/photos/JfifSupport.vala
@@ -190,7 +190,11 @@ public class JfifWriter : PhotoFileWriter {
}
public override void write(Gdk.Pixbuf pixbuf, Jpeg.Quality quality) throws Error {
- pixbuf.save(get_filepath(), "jpeg", "quality", quality.get_pct_text());
+ if (pixbuf.has_alpha) {
+ apply_alpha_channel(pixbuf).save(get_filepath(), "jpeg", "quality", quality.get_pct_text());
+ } else {
+ pixbuf.save(get_filepath(), "jpeg", "quality", quality.get_pct_text());
+ }
}
}