gdk-pixbuf: Fix Pixbuf::put_pixel when alpha channel disabled
@@ -160,9 +160,11 @@ impl Pixbuf {
pixels[pos] = red;
pixels[pos + 1] = green;
pixels[pos + 2] = blue;
+ if n_channels == 4 {
pixels[pos + 3] = alpha;
}
}
+ }
pub fn get_file_info<T: AsRef<Path>>(filename: T) -> Option<(PixbufFormat, i32, i32)> {
unsafe {
