Documentation ¶
Index ¶
- func Scale(img image.Image, width, height int) image.Image
- func ScaleDownProportionally(currentWidth, currentHeight, desiredWidth, desiredHeight int) (width, height int)
- func ScaleProportionally(currentWidth, currentHeight, desiredWidth, desiredHeight int) (width, height int)
- func ScaleTo(img image.Image, sizes []image.Point) []image.Image
- func ScaleUpProportionally(currentWidth, currentHeight, desiredWidth, desiredHeight int) (width, height int)
- func Stack(images ...image.Image) image.Image
- func StackAt(images ...*ImageAt) image.Image
- type ImageAt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScaleDownProportionally ¶
func ScaleDownProportionally(currentWidth, currentHeight, desiredWidth, desiredHeight int) (width, height int)
ScaleDownProportionally returns the width and height that are closest to the desired values without distorting the size, but won't increase the current values.
func ScaleProportionally ¶
func ScaleProportionally(currentWidth, currentHeight, desiredWidth, desiredHeight int) (width, height int)
ScaleProportionally returns the width and height that are closest to the desired values without distorting the size.
func ScaleTo ¶
ScaleTo scales the image to the desired sizes. If an image cannot be scaled exactly to the desired size, it will be scaled proportionally and then centered within the available space.
func ScaleUpProportionally ¶
func ScaleUpProportionally(currentWidth, currentHeight, desiredWidth, desiredHeight int) (width, height int)
ScaleUpProportionally returns the width and height that are closest to the desired values without distorting the size, but won't decrease the current values.
func Stack ¶
Stack a set of images on top of each other, producing a new image. The first image in the series will be on the bottom and the last will be on the top. If the images are of different sizes, the resulting image will be the size of the largest image and all other images will be centered within that area.
func StackAt ¶
StackAt stacks a set of images on top of each other, producing a new image. The first image in the series will be on the bottom and the last will be on the top. The resulting image will be the size of the largest area covered based on each image's size plus origin. Note that if an origin has a negative value, it will be normalized such that the largest negative will become the new origin for the resulting image.