go-thumber
Gopher image was created by Takuya Ueda (https://twitter.com/tenntenn).
Licensed under the Creative Commons 3.0 Attributions license.
https://github.com/pixiv/go-thumber
αϜωΠϧมϓϩΩγ
JPEGɺPNGͷຒΊࠐΈΧϥʔϓϩϑΝΠϧʹରԠ
ೖྗઐ༻ɺຒΊࠐΈग़ྗͰ͖ͳ͍߹sRGBʹม
Color ProfileରԠ
ICC ICC
ICC
ICC
ICC
LittleCMS2
Slide 33
Slide 33 text
type ScanLineReader interface {
// Config returns the image configuration.
Config() *Config
// ReadScanLines reads scan lines into the p for each component.
ReadScanLines(ctx context.Context, p [][]uint8) (int, error)
}
֤ը૾มίϯϙʔωϯτΛؔͱ࣮ͯ͠
ը૾มύΠϓϥΠϯ
func Scale(src ScanLineReader, width, height int) ScanLineReader
Slide 34
Slide 34 text
c := Decode(src)
c = Clip(c, image.Rect(10,10,410,310))
c = Scale(c, 200, 150)
Encode(rw, c)
ը૾มύΠϓϥΠϯ
Decode
Clip
Scale
Encode
ෳͷը૾ॲཧΛ࿈݁