Incremental image processing from web sources. Reads from png and jpg sources, but uses only jpeg internally and for exports.
go get -u github.com/golibri/image
- Initialize with an image URL (
.png,.jpgor.jpeg) - Download and analyze the actual image (bytes, height, width)
- Create a thumbnail of arbitrary size off the image (jpg)
- The Thumbnail also has a Base64 representation
img := image.New("https://golang.org/doc/gopher/frontpage.png"). // init
Fetch(). // download and analyze
CreateThumbnail(120, 70) // width, height
thumb := img.Thumbnail // thumb also has type "Image"Check the struct's data fields for any info you might need. You can also create a Base64 off the original image if needed.
LGPLv3. (You can use it in commercial projects as you like, but improvements/bugfixes must flow back to this lib.)