icns

Easily create .icns files (Mac Icons) with this Go library or the included CLI.
Log | Files | Refs | LICENSE

commit 04e8a09f580990668188937e15c01aba55b5d7d9
parent 9b3f03f2bdb077da0d3dd42b6b54aa6870a24226
Author: Jack Mordaunt <jackmordaunt@gmail.com>
Date:   Mon, 29 Jan 2018 19:32:58 +0100

[*] Renamed file for clarity.

Diffstat:
Dinterp.go | 44--------------------------------------------
1 file changed, 0 insertions(+), 44 deletions(-)

diff --git a/interp.go b/interp.go @@ -1,44 +0,0 @@ -package icns - -import ( - "image" - "io" - - "github.com/nfnt/resize" -) - -// InterpolationFunction is the algorithm used to resize the image. -type InterpolationFunction = resize.InterpolationFunction - -// InterpolationFunction constants. -const ( - // Nearest-neighbor interpolation - NearestNeighbor InterpolationFunction = iota - // Bilinear interpolation - Bilinear - // Bicubic interpolation (with cubic hermite spline) - Bicubic - // Mitchell-Netravali interpolation - MitchellNetravali - // Lanczos interpolation (a=2) - Lanczos2 - // Lanczos interpolation (a=3) - Lanczos3 -) - -// EncodeWithInterpolationFunction uses the given interpolation function resize -// the image before writing out to wr. -func EncodeWithInterpolationFunction( - wr io.Writer, - img image.Image, - interp InterpolationFunction, -) error { - iconset, err := NewIconSet(img, interp) - if err != nil { - return err - } - if _, err := iconset.WriteTo(wr); err != nil { - return err - } - return nil -}