mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 01:27:26 +08:00
1 parent
17a9a03361
commit
c4b81155a9
19 files changed
+410
-142
No files matched your search
+7
-7
@@ -23,6 +23,13 @@ import (
|
||||
"math/bits"
|
||||
)
|
||||
|
||||
// bmpColorMask 保存一个BMP颜色分量的位域位置和取值范围
|
||||
type bmpColorMask struct {
|
||||
mask uint32
|
||||
shift uint
|
||||
max uint32
|
||||
}
|
||||
|
||||
// decodeImageConfig 读取图片尺寸,BMP和TIFF只读取布局信息,不解码像素
|
||||
// 入参: input 图片输入流
|
||||
// 返回: image.Config 图片配置, string 图片格式, error 头部错误
|
||||
@@ -57,13 +64,6 @@ func decodeImageConfig(input io.Reader) (image.Config, string, error) {
|
||||
return image.DecodeConfig(buffer)
|
||||
}
|
||||
|
||||
// bmpColorMask 保存一个BMP颜色分量的位域位置和取值范围
|
||||
type bmpColorMask struct {
|
||||
mask uint32
|
||||
shift uint
|
||||
max uint32
|
||||
}
|
||||
|
||||
// sample 将位域采样值映射到八位通道,缺省透明度为不透明
|
||||
// 入参: value 编码像素
|
||||
// 返回: uint8 通道值
|
||||
|
||||
Reference in new issue
Block a user