ascii85x-0.2.4.1: Displays TI-85 variable files as text
Safe HaskellNone
LanguageHaskell2010

Data.TI85.Var.Pic

Description

Picture variable types and utilities.

Synopsis

TI Bitmap

data TIBitmap Source #

A TI Picture variable is encoded as a packed bitmap, and is always 128x63 binary pixels.

Instances

Instances details
Show TIBitmap Source # 
Instance details

Defined in Data.TI85.Var.Pic

emptyBitmap :: TIBitmap Source #

A blank (all zero) bitmap

fromBytes :: ByteString -> Maybe TIBitmap Source #

Create a bitmap from a packed ByteString. If the data is the wrong size, returns Nothing.

toBytes :: TIBitmap -> ByteString Source #

Extract the raw ByteString from a bitmap.

Display utilities

showAsciiArt :: TIBitmap -> Text Source #

Create a text-based representation of a picture. Background pixels are rendered as spaces, while foreground are rendered as full block glyphs (█).

writePicPng :: FilePath -> TIBitmap -> IO () Source #

Save a bitmap as a PNG image. Bits are mapped to pixels using a vaguely calculator-like color map (light gray background, dark gray foreground).