Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteExtraSpace ¶
func NewInterventionImage ¶
func ParseInt64 ¶
func ParseInt64(i interface{}) int64
func RandomString ¶
Types ¶
type Config ¶
type Config struct { Image image.Image NewNRGBA *image.NRGBA FilePath string SaveFilefolder string }
Used to initialize the configuration There are (Image/NewNRGBA/FilePath) three ways to initialize a picture. If not, a blank picture with a black background is created. SaveFilefolder used to set the folder for file saving. The default is the program execution directory.
type WaterMarkConfig ¶
type WaterMarkConfig struct { FontPath string Fontbase64 *[]byte FontSize float64 FontDPI float64 DestX int DestY int DestPosition string WaterMarkColor color.RGBA }
Image watermark configuration item FontPath Custom font path, The format is TTF Fontbase64 Custom font path, TTF transfer base64 FontSize Custom font size, The default value is 12 FontDPI The default value is 72 DestX, DestY Specifies where the watermark appears in the image DestPosition Describes where the watermark appears in the image,support('LEFT TOP'|'LEFT BUTTOM'|'RIGHT TOP'|'RIGHT BUTTOM'|'CENTER CENTER'),Case insensitive WaterMarkColor Specifies the watermark text color, If not specified, the text color (white and black) is set according to the background color of the picture