mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Copy the mask_color in image_crop() function.
This commit is contained in:
parent
6120c38b52
commit
97f04c7a79
@ -155,6 +155,7 @@ Image* image_crop(const Image* image, int x, int y, int w, int h, int bgcolor)
|
||||
if (h < 1) throw std::invalid_argument("image_crop: Height is less than 1");
|
||||
|
||||
Image* trim = image_new(image->imgtype, w, h);
|
||||
trim->mask_color = image->mask_color;
|
||||
|
||||
image_clear(trim, bgcolor);
|
||||
image_copy(trim, image, -x, -y);
|
||||
|
Loading…
x
Reference in New Issue
Block a user