Documentation ¶
Overview ¶
Package b64image provides helper functions for manipulating base64 encoded PNG or JPEG images
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Colorize ¶
Colorize adds a color to the transparent background of the original image and returns the result. If color is the zero value, then a random color is applied.
The original must be a base64 encoded image, either JPEG or PNG. The result is a base64 encoded PNG image.
func ColorsEqual ¶
ColorsEqual returns true if both colors are the same
func ReadAll ¶
ReadAll opens the given file which must be an image and returns its content as base64
func Resize ¶
Resize a base64 encoded image. The image will be resized to the given size, while keeping the aspect ratios, and holes in the image will be filled with transparent background. The image will not be stretched if smaller than the expected size.
A None value for any of width or height mean an automatically computed value based respectively on height or width of the source image.
Types ¶
This section is empty.