亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

directory search
archive archive/tar archive/zip bufio bufio(緩存) builtin builtin(內(nèi)置包) bytes bytes(包字節(jié)) compress compress/bzip2(壓縮/bzip2) compress/flate(壓縮/flate) compress/gzip(壓縮/gzip) compress/lzw(壓縮/lzw) compress/zlib(壓縮/zlib) container container/heap(容器數(shù)據(jù)結(jié)構(gòu)heap) container/list(容器數(shù)據(jù)結(jié)構(gòu)list) container/ring(容器數(shù)據(jù)結(jié)構(gòu)ring) context context(上下文) crypto crypto(加密) crypto/aes(加密/aes) crypto/cipher(加密/cipher) crypto/des(加密/des) crypto/dsa(加密/dsa) crypto/ecdsa(加密/ecdsa) crypto/elliptic(加密/elliptic) crypto/hmac(加密/hmac) crypto/md5(加密/md5) crypto/rand(加密/rand) crypto/rc4(加密/rc4) crypto/rsa(加密/rsa) crypto/sha1(加密/sha1) crypto/sha256(加密/sha256) crypto/sha512(加密/sha512) crypto/subtle(加密/subtle) crypto/tls(加密/tls) crypto/x509(加密/x509) crypto/x509/pkix(加密/x509/pkix) database database/sql(數(shù)據(jù)庫/sql) database/sql/driver(數(shù)據(jù)庫/sql/driver) debug debug/dwarf(調(diào)試/dwarf) debug/elf(調(diào)試/elf) debug/gosym(調(diào)試/gosym) debug/macho(調(diào)試/macho) debug/pe(調(diào)試/pe) debug/plan9obj(調(diào)試/plan9obj) encoding encoding(編碼) encoding/ascii85(編碼/ascii85) encoding/asn1(編碼/asn1) encoding/base32(編碼/base32) encoding/base64(編碼/base64) encoding/binary(編碼/binary) encoding/csv(編碼/csv) encoding/gob(編碼/gob) encoding/hex(編碼/hex) encoding/json(編碼/json) encoding/pem(編碼/pem) encoding/xml(編碼/xml) errors errors(錯誤) expvar expvar flag flag(命令行參數(shù)解析flag包) fmt fmt go go/ast(抽象語法樹) go/build go/constant(常量) go/doc(文檔) go/format(格式) go/importer go/parser go/printer go/scanner(掃描儀) go/token(令牌) go/types(類型) hash hash(散列) hash/adler32 hash/crc32 hash/crc64 hash/fnv html html html/template(模板) image image(圖像) image/color(顏色) image/color/palette(調(diào)色板) image/draw(繪圖) image/gif image/jpeg image/png index index/suffixarray io io io/ioutil log log log/syslog(日志系統(tǒng)) math math math/big math/big math/bits math/bits math/cmplx math/cmplx math/rand math/rand mime mime mime/multipart(多部分) mime/quotedprintable net net net/http net/http net/http/cgi net/http/cookiejar net/http/fcgi net/http/httptest net/http/httptrace net/http/httputil net/http/internal net/http/pprof net/mail net/mail net/rpc net/rpc net/rpc/jsonrpc net/smtp net/smtp net/textproto net/textproto net/url net/url os os os/exec os/signal os/user path path path/filepath(文件路徑) plugin plugin(插件) reflect reflect(反射) regexp regexp(正則表達式) regexp/syntax runtime runtime(運行時) runtime/debug(調(diào)試) runtime/internal/sys runtime/pprof runtime/race(競爭) runtime/trace(執(zhí)行追蹤器) sort sort(排序算法) strconv strconv(轉(zhuǎn)換) strings strings(字符串) sync sync(同步) sync/atomic(原子操作) syscall syscall(系統(tǒng)調(diào)用) testing testing(測試) testing/iotest testing/quick text text/scanner(掃描文本) text/tabwriter text/template(定義模板) text/template/parse time time(時間戳) unicode unicode unicode/utf16 unicode/utf8 unsafe unsafe
characters

  • import "image/color"

  • Overview

  • Index

  • Subdirectories

概觀

Package color實現(xiàn)了一個基本的顏色庫。

索引

  • Variables

  • func CMYKToRGB(c, m, y, k uint8) (uint8, uint8, uint8)

  • func RGBToCMYK(r, g, b uint8) (uint8, uint8, uint8, uint8)

  • func RGBToYCbCr(r, g, b uint8) (uint8, uint8, uint8)

  • func YCbCrToRGB(y, cb, cr uint8) (uint8, uint8, uint8)

  • type Alpha

  • func (c Alpha) RGBA() (r, g, b, a uint32)

  • type Alpha16

  • func (c Alpha16) RGBA() (r, g, b, a uint32)

  • type CMYK

  • func (c CMYK) RGBA() (uint32, uint32, uint32, uint32)

  • type Color

  • type Gray

  • func (c Gray) RGBA() (r, g, b, a uint32)

  • type Gray16

  • func (c Gray16) RGBA() (r, g, b, a uint32)

  • type Model

  • func ModelFunc(f func(Color) Color) Model

  • type NRGBA

  • func (c NRGBA) RGBA() (r, g, b, a uint32)

  • type NRGBA64

  • func (c NRGBA64) RGBA() (r, g, b, a uint32)

  • type NYCbCrA

  • func (c NYCbCrA) RGBA() (uint32, uint32, uint32, uint32)

  • type Palette

  • func (p Palette) Convert(c Color) Color

  • func (p Palette) Index(c Color) int

  • type RGBA

  • func (c RGBA) RGBA() (r, g, b, a uint32)

  • type RGBA64

  • func (c RGBA64) RGBA() (r, g, b, a uint32)

  • type YCbCr

  • func (c YCbCr) RGBA() (uint32, uint32, uint32, uint32)

包文件

color.go ycbcr.go

變量

標準顏色。

var (
        Black       = Gray16{0}
        White       = Gray16{0xffff}
        Transparent = Alpha16{0}
        Opaque      = Alpha16{0xffff})

func CMYKToRGB

func CMYKToRGB(c, m, y, k uint8) (uint8, uint8, uint8)

CMYKToRGB 將 CMYK 四元組轉(zhuǎn)換為 RGB 三元組。

func RGBToCMYK

func RGBToCMYK(r, g, b uint8) (uint8, uint8, uint8, uint8)

RGBToCMYK 將 RGB 三元組轉(zhuǎn)換為 CMYK 四元組。

func RGBToYCbCr

func RGBToYCbCr(r, g, b uint8) (uint8, uint8, uint8)

RGBToYCbCr 將 RGB 三元組轉(zhuǎn)換為 Y'CbCr 三元組。

func YCbCrToRGB

func YCbCrToRGB(y, cb, cr uint8) (uint8, uint8, uint8)

YCbCrToRGB 將 Y'CbCr 三元組轉(zhuǎn)換為 RGB 三元組。

type Alpha

Alpha 代表8位阿爾法顏色。

type Alpha struct {
        A uint8}

func (Alpha) RGBA

func (c Alpha) RGBA() (r, g, b, a uint32)

type Alpha16

Alpha16 代表一個 16 位的 alpha 顏色。

type Alpha16 struct {
        A uint16}

func (Alpha16) RGBA

func (c Alpha16) RGBA() (r, g, b, a uint32)

type CMYK

CMYK 表示完全不透明的 CMYK 顏色,每個青色,品紅色,黃色和黑色都有8位。

它不與任何特定的顏色配置文件相關(guān)聯(lián)。

type CMYK struct {
        C, M, Y, K uint8}

func (CMYK) RGBA

func (c CMYK) RGBA() (uint32, uint32, uint32, uint32)

type Color

顏色可以將其自身轉(zhuǎn)換為每通道RGBA的alpha預(yù)乘16位。轉(zhuǎn)換可能是有損的。

type Color interface {        // RGBA returns the alpha-premultiplied red, green, blue and alpha values        // for the color. Each value ranges within [0, 0xffff], but is represented        // by a uint32 so that multiplying by a blend factor up to 0xffff will not        // overflow.        //        // An alpha-premultiplied color component c has been scaled by alpha (a),        // so has valid values 0 <= c <= a.        RGBA() (r, g, b, a uint32)}

type Gray

Gray 表示8位灰度色。

type Gray struct {
        Y uint8}

func (Gray) RGBA

func (c Gray) RGBA() (r, g, b, a uint32)

type Gray16

Gray16表示16位灰度色。

type Gray16 struct {
        Y uint16}

func (Gray16) RGBA

func (c Gray16) RGBA() (r, g, b, a uint32)

type Model

Model可以將任何顏色轉(zhuǎn)換為其自己的顏色模型。轉(zhuǎn)換可能是有損的。

type Model interface {        Convert(c Color) Color}

Models顏色類型的模型。

var (
        RGBAModel    Model = ModelFunc(rgbaModel)
        RGBA64Model  Model = ModelFunc(rgba64Model)
        NRGBAModel   Model = ModelFunc(nrgbaModel)
        NRGBA64Model Model = ModelFunc(nrgba64Model)
        AlphaModel   Model = ModelFunc(alphaModel)
        Alpha16Model Model = ModelFunc(alpha16Model)
        GrayModel    Model = ModelFunc(grayModel)
        Gray16Model  Model = ModelFunc(gray16Model))

CMYKModel是CMYK顏色的模型。

var CMYKModel Model = ModelFunc(cmykModel)

NYCbCrAModel是非α預(yù)乘Y'CbCr與alpha顏色的模型。

var NYCbCrAModel Model = ModelFunc(nYCbCrAModel)

YCbCrModel是Y'CbCr顏色的模型。

var YCbCrModel Model = ModelFunc(yCbCrModel)

func ModelFunc

func ModelFunc(f func(Color) Color) Model

ModelFunc返回一個調(diào)用f來實現(xiàn)轉(zhuǎn)換的模型。

type NRGBA

NRGBA表示非Alpha預(yù)乘32位顏色。

type NRGBA struct {
        R, G, B, A uint8}

func (NRGBA) RGBA

func (c NRGBA) RGBA() (r, g, b, a uint32)

type NRGBA64

NRGBA64表示非alpha預(yù)乘64位顏色,每個紅色,綠色,藍色和alpha有16位。

type NRGBA64 struct {
        R, G, B, A uint16}

func (NRGBA64) RGBA

func (c NRGBA64) RGBA() (r, g, b, a uint32)

type NYCbCrA

NYCbCrA代表一個非α預(yù)乘Y'CbCr-alpha-color,每個亮度,兩個色度和一個alpha分量都有8位。

type NYCbCrA struct {
        YCbCr
        A uint8}

func (NYCbCrA) RGBA

func (c NYCbCrA) RGBA() (uint32, uint32, uint32, uint32)

type Palette

Palette是一種顏色調(diào)色板。

type Palette []Color

func (Palette) Convert

func (p Palette) Convert(c Color) Color

Convert在Euclidean R,G,B空間返回與c最接近的調(diào)色板顏色。

func (Palette) Index

func (p Palette) Index(c Color) int

Index 返回歐幾里德R,G,B,A空間中最接近c的調(diào)色板顏色索引。

type RGBA

RGBA表示傳統(tǒng)的32位預(yù)處理Alpha色,每個顏色都有8位,分別表示紅色,綠色,藍色和阿爾法。

alpha-premultiplied顏色分量C已被縮放alpha(A),所以具有有效值0 <= C <= A.

type RGBA struct {
        R, G, B, A uint8}

func (RGBA) RGBA

func (c RGBA) RGBA() (r, g, b, a uint32)

type RGBA64

RGBA64代表一個64位的alpha預(yù)乘顏色,每個紅色,綠色,藍色和alpha都有16位。

alpha-premultiplied顏色分量C已被縮放alpha(A),所以具有有效值0 <= C <= A.

type RGBA64 struct {
        R, G, B, A uint16}

func (RGBA64) RGBA

func (c RGBA64) RGBA() (r, g, b, a uint32)

type YCbCr

YCbCr表示完全不透明的24位Y'CbCr顏色,每個顏色具有8位,用于一個亮度和兩個色度分量。

JPEG,VP8,MPEG系列和其他編解碼器都使用這種顏色模型。這種編解碼器通常可互換地使用術(shù)語YUV和Y'CbCr,但嚴格地說,術(shù)語YUV僅適用于模擬視頻信號,并且在應(yīng)用伽瑪校正之后Y'(亮度)是Y(亮度)。

RGB和Y'CbCr之間的轉(zhuǎn)換是有損耗的,并且在兩者之間轉(zhuǎn)換時有多個稍微不同的公式。該包遵循h(huán)ttp://www.w3.org/Graphics/JPEG/jfif3.pdf中的JFIF規(guī)范。

type YCbCr struct {
        Y, Cb, Cr uint8}

func (YCbCr) RGBA

func (c YCbCr) RGBA() (uint32, uint32, uint32, uint32)

Subdirectories

Name

Synopsis

| .. |

| palette| 包調(diào)色板提供標準調(diào)色板。|

Previous article: Next article: