Documentation
¶
Overview ¶
enhanced https://github.com/t-tomalak/logrus-easy-formatter with fields tag added
Index ¶
- Constants
- Variables
- func FormatImageName(path *string, filter_name *string, args *[]string) (new_name, new_path string)
- func FormatImageTempName(temp_path, input_file_path *string, filter_name string) (new_name, new_path string)
- func LoadImage(filename *string) (*im.Image, string)
- func RemoveFile(filename *string) error
- func RenameFiles(pack *requests.Pack, input_file_path *string, filterList string)
- func SaveImage(image *im.RGBA, path *string, filter_name *string, args *[]string) *string
- type Formatter
- type OptionalRGBA64
Constants ¶
View Source
const ( BYTE_TO_U16 = math.MaxUint16 / 0xff // x [0; 255] * BYTE_TO_U16 = x [0; 1 << 16 - 1] BYTE_TO_U32 = math.MaxUint32 / 0xff // x [0; 255] * BYTE_TO_U32 = x [0; 1 << 32 - 1] APC_BYTE_TO_U16 = BYTE_TO_U16 / 0xff // x [0; 255] * alpha * APC_BYTE_TO_U16 = alpha-premultiplied x [0; 1 << 16 - 1] APC_BYTE_TO_U32 = BYTE_TO_U32 / 0xff // x [0; 255] * alpha * APC_BYTE_TO_U32 = alpha-premultiplied x [0; 1 << 32 - 1] APC_U16_TO_BYTE = 1 / APC_BYTE_TO_U16 // APC_BYTE_TO_U16 inverse APC_U32_TO_BYTE = 1 / APC_BYTE_TO_U32 // APC_BYTE_TO_U32 inverse )
View Source
const (
InDir = "./in/"
)
Variables ¶
View Source
var (
OutDir = "./out/"
)
Functions ¶
func FormatImageName ¶
func FormatImageTempName ¶
func RemoveFile ¶
func RenameFiles ¶
Types ¶
type Formatter ¶
type Formatter struct { // Timestamp format TimestampFormat string // Available standard keys: time, msg, lvl // Also can include custom fields but limited to strings. // All of fields need to be wrapped inside %% i.e %time% %msg% LogFormat string }
Formatter implements logrus.Formatter interface.
type OptionalRGBA64 ¶
func ParseColor ¶
func ParseColor(str string) *OptionalRGBA64
Click to show internal directories.
Click to hide internal directories.