Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 550 Bytes

README.md

File metadata and controls

22 lines (13 loc) · 550 Bytes

golang-image

Adds support of CMYK jpeg files to Golang image library.

You can use it as a drop-in replacement for the Golang default image library.

import "github.com/zhnxin/golang-image/jpeg"

JFIF support

You can wirte jfif metadata by calling:

EncodeWithJfif(w io.Writer, m image.Image,jfif *Jfif, o *Options)

And set the thumbnail by calling:

jfif := jpeg.NewJfif()
err = jfif.SetThumbnail(thumbnail)
checkErr(err)

Notic: The thumbnail should not be lager than 21845 px, which means width*hight <= 21845