Merge pull request #7 from gnxlxnxx/skip-transparent
Skip fully transparent pixels
This commit is contained in:
@@ -67,6 +67,10 @@ impl Painter {
|
|||||||
// Get the channels
|
// Get the channels
|
||||||
let channels = pixel.channels();
|
let channels = pixel.channels();
|
||||||
|
|
||||||
|
if channels[3] == 0 {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Define the color
|
// Define the color
|
||||||
let color = Color::from(channels[0], channels[1], channels[2], channels[3]);
|
let color = Color::from(channels[0], channels[1], channels[2], channels[3]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user