From 160418daeade414c89509ac9c3845d9df4708261 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 6 May 2016 09:09:47 -0300 Subject: [PATCH] Fix pasting screenshots/clipboard content in 32bpp on Windows --- src/app/util/clipboard_native.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/util/clipboard_native.cpp b/src/app/util/clipboard_native.cpp index dcdf6f51f..660a1a8a5 100644 --- a/src/app/util/clipboard_native.cpp +++ b/src/app/util/clipboard_native.cpp @@ -233,11 +233,19 @@ bool get_native_clipboard_bitmap(doc::Image** image, const uint32_t* src = (const uint32_t*)(img.data()+spec.bytes_per_row*y); for (unsigned long x=0; x> spec.alpha_shift): 255); + *it = doc::rgba( uint8_t((c & spec.red_mask ) >> spec.red_shift ), uint8_t((c & spec.green_mask) >> spec.green_shift), uint8_t((c & spec.blue_mask ) >> spec.blue_shift ), - uint8_t((c & spec.alpha_mask) >> spec.alpha_shift)); + alpha); } } break;