Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageFormat ¶
type ImageFormat string
ImageFormat represents supported image formats
const ( FormatJPEG ImageFormat = "jpeg" FormatPNG ImageFormat = "png" FormatWebP ImageFormat = "webp" FormatSVG ImageFormat = "svg" )
type Result ¶
type Result struct {
// Original file path
FilePath string
// File type (jpg, png, svg)
FileType string
// Original file size in bytes
OriginalSize int64
// Processed file size in bytes
ProcessedSize int64
// Bytes saved
BytesSaved int64
// Output file path
OutputPath string
// Whether processing was successful
Success bool
// Error message if processing failed
Error string
}
Result represents the outcome of processing a file
func ProcessImage ¶
ProcessImage handles JPEG and PNG compression and conversion
Click to show internal directories.
Click to hide internal directories.