int CStride int SubsampleRatio YCbCrSubsampleRatio Rect Rectangle } :ծ$Cծ$Sךꂁח؝ٝه٦طٝز׀הךر٦ةָろתגְ 1MBOFS :$C$S4VCTBNQMF3BUJPכ؟ـ؟ٝفؚٔٝ嫰㹀纏ׅ Y Y Y Y Y Y Y Y 0 … Y Y Y Cb Cb Cb Cb Cb Cb Cb 0 0 … Cb Cb Cb Cr Cr Cr Cr Cr Cr Cr 0 0 … Cr Cr Cr :4USJEF $4USJEF
G B A R G B A 0 0 R G B A R G B A R G B A R G B A 0 0 R G B A R G B A R G B A R G B A 0 0 R G B A R G B A R G B A R G B A 0 0 R G B A R G B A R G B A R G B A 0 0 R G B A R G B A R G B A R G B A 0 0 R G B A R G B A R G B A R G B A 0 0 R G B A R G B A R G B A R G B A 0 0 8JEUI 4USJEF 歗⫷غحؿ؋כ剑黝⻉ך4USJEF؟؎ؤד،ٓ؎ًٝٝزׁגְ Y Z ָ妜׃ְהֹכ1JY< Z3FDU.JO: 4USJEF Y3FDU.JO9 >
configurations of the image planes. Config() *Config // ReadScanLines reads scan lines into the p for each image component. it // reads up to len(p[0]) at once and returns number of bytes read and any // error. When the image is YCbCr 4:2:0, // ReadScanLines(p) returns // p[0]: read scan lines of the Y component. // p[1]: read scan lines of the Cb component. // p[2]: read scan lines of the Cr component. // // ReadScanLines returns an error in the same manner of io.Reader. ReadScanLines(ctx context.Context, p [][]byte) (n int, err error) // ReadLen returns the minimum buffer length that needs to read from this. ReadLen() (n int) }
p for each image component… ReadScanLines(ctx context.Context, p [][]byte) (n int, err error) p[0]: Y Y Y Y Y Y Y Y … p[1]: Cb Cb Cb Cb Cb Cb Cb Cb … p[2]: Cr Cr Cr Cr Cr Cr Cr Cr … +1&(%FDPEFS p[0]: R G B A R G B A … 1/(%FDPEFS