mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 16:59:27 +08:00
1 parent
f3cc35e78c
commit
83159a475c
6 files changed
+36
-36
No files matched your search
+12
-12
@@ -28,6 +28,18 @@ import (
|
||||
"github.com/xiaoqidun/pdfgo"
|
||||
)
|
||||
|
||||
// StencilImage 按当前填充色读取模板图像,不分配整幅彩色样本
|
||||
type StencilImage struct {
|
||||
Source image.Image
|
||||
Fill color.NRGBA64
|
||||
}
|
||||
|
||||
// NativeImage 按源像素输出原生过程色,不分配完整显示颜色缓冲
|
||||
type NativeImage struct {
|
||||
Source *pdfgo.ImageProcess
|
||||
Space *pdfgo.ColorSpace
|
||||
}
|
||||
|
||||
// EncodeCMYKTIFF 将直接四色图像保存为十六位无损TIFF,不经过显示颜色转换
|
||||
// 入参: ctx 取消上下文, source PDF源图像
|
||||
// 返回: []byte 含ICC和非预乘透明度的TIFF,非四色图像为nil, error 解码或编码错误
|
||||
@@ -143,18 +155,6 @@ func EncodeCMYKTIFF(ctx context.Context, source *pdfgo.Image) ([]byte, error) {
|
||||
return data, nil
|
||||
}
|
||||
|
||||
// StencilImage 按当前填充色读取模板图像,不分配整幅彩色样本
|
||||
type StencilImage struct {
|
||||
Source image.Image
|
||||
Fill color.NRGBA64
|
||||
}
|
||||
|
||||
// NativeImage 按源像素输出原生过程色,不分配完整显示颜色缓冲
|
||||
type NativeImage struct {
|
||||
Source *pdfgo.ImageProcess
|
||||
Space *pdfgo.ColorSpace
|
||||
}
|
||||
|
||||
// ColorModel 保留填充色和模板的有效采样精度
|
||||
// 返回: color.Model 非预乘颜色模型
|
||||
func (s *StencilImage) ColorModel() color.Model {
|
||||
|
||||
Reference in new issue
Block a user