mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-16 13:14:44 +00:00
Fix color_utils::color_for_image() when the color is of index type and the imgtype is indexed.
This commit is contained in:
parent
ae918802e3
commit
75fd21164e
@ -123,7 +123,10 @@ int color_utils::color_for_image(const Color& color, int imgtype)
|
||||
c = _graya(color.getGray(), 255);
|
||||
break;
|
||||
case IMAGE_INDEXED:
|
||||
c = get_current_palette()->findBestfit(color.getRed(), color.getGreen(), color.getBlue());
|
||||
if (color.getType() == Color::IndexType)
|
||||
c = color.getIndex();
|
||||
else
|
||||
c = get_current_palette()->findBestfit(color.getRed(), color.getGreen(), color.getBlue());
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user