feat(转换编辑): 优化转换与编辑功能
build.yaml / build (push) Successful in 39s

This commit is contained in:
xiaoqidun committed 2026-09-26 10:50:52 +08:00
1 parent 35631cdf98
commit c3908819bb
23 files changed
+303 -81

No files matched your search

+4 -1
View File
@@ -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++ {