Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImageDimensions ¶
ImageDimensions returns the width and height of an image without fully decoding pixel data. This is faster than DecodeToPNG when you only need the dimensions (e.g. to calculate terminal row count).
func WrapBase64 ¶
WrapBase64 wraps base64-encoded data at 76 characters per line with \r\n separators, as required by MIME (RFC 2045).
Types ¶
type ImageConvertResult ¶
ImageConvertResult holds the output of DecodeToPNG.
func DecodeToPNG ¶
func DecodeToPNG(data []byte) (ImageConvertResult, bool)
DecodeToPNG takes raw image bytes (JPEG, PNG, BMP, GIF, etc.) and returns PNG-encoded bytes along with image dimensions. Uses stb_image for decoding and stb_image_write for PNG encoding in C, which is faster than Go's image stdlib for large images.
Click to show internal directories.
Click to hide internal directories.