Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateDimensions ¶
CalculateDimensions calculates output dimensions maintaining aspect ratio. If both width and height are specified, returns them unchanged. If only width is specified, calculates height from image aspect ratio. If only height is specified, calculates width from image aspect ratio. If neither is specified, uses maxWidth and maxHeight as constraints while maintaining aspect ratio.
The calculation accounts for braille characters being 2 pixels wide × 4 pixels tall.
Types ¶
type Options ¶
type Options struct {
Width int // Width in braille characters
Height int // Height in braille characters
Threshold uint8 // Brightness threshold (0-255), default 20
NoColor bool // Disable ANSI color output
BackgroundColor *uint8 // Background color for ANSI output (nil = no background)
Frame bool // Draw a white ASCII frame around the picture
}
Options configures the braille conversion.
Click to show internal directories.
Click to hide internal directories.