Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsFileExists ¶
IsFileExists checks if the file specified by the filepath exists.
It returns true if the file exists, otherwise false. It handles errors using os.Stat to determine existence, returning false if the file does not exist or if an error occurs.
func IsJPEGish ¶
IsJPEGish checks if the provided file extension is either "jpg" or "jpeg".
It returns true if the extension matches "jpg" or "jpeg", otherwise false.
func IsPNG ¶
IsPNG checks if the provided file extension is "png".
It returns true if the extension matches "png", otherwise false.
func SaveImage ¶
SaveImage saves the image pointed to by m to the specified filepath.
It saves the image in the format specified by the extension parameter. Currently supported formats include JPEG ("jpg" or "jpeg") and PNG ("png"). Returns an error if there is an issue creating the file or encoding the image.
Types ¶
This section is empty.