diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-25 08:40:02 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-25 08:40:02 +1100 |
commit | 5981880a99b62b52c74619ea535abd24b6b132cf (patch) | |
tree | 1c15395c792dd7e2d01b32770753ab3e93f349a1 /source/core/StarImageProcessing.cpp | |
parent | 8899a1d27016880708783f9452cb010d8111fe82 (diff) |
title changes (moved quit button away) + better compressed all the pngs
Diffstat (limited to 'source/core/StarImageProcessing.cpp')
-rw-r--r-- | source/core/StarImageProcessing.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/core/StarImageProcessing.cpp b/source/core/StarImageProcessing.cpp index a56cedc..98f65f4 100644 --- a/source/core/StarImageProcessing.cpp +++ b/source/core/StarImageProcessing.cpp @@ -446,6 +446,10 @@ StringList imageOperationReferences(List<ImageOperation> const& operations) { } void processImageOperation(ImageOperation const& operation, Image& image, ImageReferenceCallback refCallback) { + if (image.bytesPerPixel() == 3) { + // Convert to an image format that has alpha so certain operations function properly + image = image.convert(image.pixelFormat() == PixelFormat::BGR24 ? PixelFormat::BGRA32 : PixelFormat::RGBA32); + } if (auto op = operation.ptr<HueShiftImageOperation>()) { image.forEachPixel([&op](unsigned, unsigned, Vec4B& pixel) { if (pixel[3] != 0) |