[shotwell] Fix crash on editing images with alpha channel



commit 4d5d74542b64fe4766b72b7368c50e06bc514bf9
Author: Jens Georg <mail jensge org>
Date:   Wed Mar 28 19:19:42 2018 +0200

    Fix crash on editing images with alpha channel
    
    The cache does not carry alpha channel, use proper counting there to not
    exceed the cache size

 src/ColorTransformation.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/ColorTransformation.vala b/src/ColorTransformation.vala
index 0ba8b1d..8595e96 100644
--- a/src/ColorTransformation.vala
+++ b/src/ColorTransformation.vala
@@ -785,7 +785,7 @@ public class PixelTransformer {
             var row = job * slice_length;
             var slice_height = (row + slice_length).clamp(0, dest_height);
             threads[job] = new GLib.Thread<void*>("shotwell-worker", () => {
-                uint cache_pixel_ticker = row * dest_width * dest_num_channels;
+                uint cache_pixel_ticker = row * dest_width * 3;
                 for (uint j = row; j < slice_height; j++) {
                     uint row_start_index = j * dest_rowstride;
                     uint row_end_index = row_start_index + (dest_width * dest_num_channels);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]