Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageTransformer ¶
type ImageTransformer struct {
// contains filtered or unexported fields
}
ImageTransformer transforms image data for display in terminals It implements io.Reader and handles format conversion: - PNG: passes through with base64url -> base64 translation - JPEG/GIF/etc: decodes -> encodes to PNG -> base64
func NewImageTransformer ¶
func NewImageTransformer( base64urlData string, contentType string, ) (*ImageTransformer, int, int, error)
NewImageTransformer creates a new image transformer base64urlData is the base64url-encoded image data from Gmail contentType is the MIME type (e.g., "image/png", "image/jpeg") Returns the transformer and the image dimensions (width, height)
func (*ImageTransformer) Close ¶
func (t *ImageTransformer) Close() error
Close cleans up resources, particularly stopping the background goroutine for non-PNG image conversions. It's safe to call multiple times.
Click to show internal directories.
Click to hide internal directories.