mirror of
https://github.com/unidoc/unipdf.git
synced 2025-04-27 13:48:51 +08:00
Allow variable number of Ranges in ICC color spaces
This commit is contained in:
parent
2d1c5ae1b0
commit
4db1306daf
@ -1689,7 +1689,11 @@ func (this *PdfColorspaceICCBased) ToPdfObject() PdfObject {
|
||||
(*dict)["Metadata"] = this.Metadata
|
||||
}
|
||||
if this.Range != nil {
|
||||
(*dict)["Range"] = MakeArray(MakeFloat(this.Range[0]), MakeFloat(this.Range[1]), MakeFloat(this.Range[2]), MakeFloat(this.Range[3]))
|
||||
ranges := []PdfObject{}
|
||||
for _, r := range this.Range {
|
||||
ranges = append(ranges, MakeFloat(r))
|
||||
}
|
||||
(*dict)["Range"] = MakeArray(ranges...)
|
||||
}
|
||||
|
||||
// Encode with a default encoder?
|
||||
|
Loading…
x
Reference in New Issue
Block a user