mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 01:27:26 +08:00
1 parent
35631cdf98
commit
c3908819bb
23 files changed
+303
-81
No files matched your search
@@ -64,7 +64,10 @@ func (b CanvasBackend) Render(page *RasterPage) (image.Image, error) {
|
||||
masks := renderCache[[32]byte, *image.Alpha]{limit: 16 << 20}
|
||||
for i, cmd := range page.Commands {
|
||||
if cmd.Image != nil {
|
||||
source := cmd.Image
|
||||
source, err := imagePixelData(cmd.Image)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("canvas image %d: %w", i, err)
|
||||
}
|
||||
if _, linear := space.(canvas.LinearColorSpace); !linear {
|
||||
converted := image.NewRGBA(source.Bounds())
|
||||
for y := source.Bounds().Min.Y; y < source.Bounds().Max.Y; y++ {
|
||||
|
||||
Reference in new issue
Block a user