Skip to content

Make it easy to crop image pixels or update images by character cells. #28

@amano-kenji

Description

@amano-kenji

Many terminal UI libraries would prefer to just display images in given character cells(for example, 30 columns 20 rows) and update images cell by cell.

Is it going to be inefficient to draw an image for the first time cell by cell? Updating an image cell by cell could be efficient.

To manipulate images cell by cell, programmers would need to know how many image pixels fit in a character cell horizontally and vertically. Physical pixels of a terminal emulator may not have the same size as image pixels.

Haskell's vty library only knows character cells. It doesn't know image pixels. If vty was able to draw an image cell by cell efficiently, it could support images easily. Because vty has to know what each character cell contains in order to know which character cells to actually update, it wouldn't use alpha channel in image pixels. For example, drawing a partially transparent image character cell over a text character cell would complicate the computation of whether a character cell needs to be updated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions