mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-29 03:32:48 +00:00
Update color profiles from image sprites in Sprite::setColorSpace()
This is needed for cmd::AssignColorProfile() to change the color space of all images when we update the color space of the sprite.
This commit is contained in:
parent
81965b904f
commit
43a603cea9
@ -51,6 +51,7 @@ namespace doc {
|
||||
gfx::Rect bounds() const { return m_spec.bounds(); }
|
||||
color_t maskColor() const { return m_spec.maskColor(); }
|
||||
void setMaskColor(color_t c) { m_spec.setMaskColor(c); }
|
||||
void setColorSpace(const gfx::ColorSpacePtr& cs) { m_spec.setColorSpace(cs); }
|
||||
|
||||
virtual int getMemSize() const override;
|
||||
int getRowStrideSize() const;
|
||||
|
@ -145,6 +145,8 @@ void Sprite::setSize(int width, int height)
|
||||
void Sprite::setColorSpace(const gfx::ColorSpacePtr& colorSpace)
|
||||
{
|
||||
m_spec.setColorSpace(colorSpace);
|
||||
for (auto cel : uniqueCels())
|
||||
cel->image()->setColorSpace(colorSpace);
|
||||
}
|
||||
|
||||
bool Sprite::needAlpha() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user