mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
1 parent
e4af1e7318
commit
59a2c4d8fe
9 files changed
+187
-83
No files matched your search
@@ -208,8 +208,9 @@ func (e *Editor) RGBColor(value color.NRGBA) (*FillColor, error) {
|
||||
}
|
||||
}
|
||||
for _, resource := range e.resources {
|
||||
if resource.space != nil {
|
||||
result.ColorSpace = resource.space.ID
|
||||
space := resource.space
|
||||
if space != nil && space.Type == "RGB" && (space.BitsPerComponent == 0 || space.BitsPerComponent == 8) && len(space.Palette) == 0 {
|
||||
result.ColorSpace = space.ID
|
||||
return result, nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user