Skip to content

skip broken cliimage #23

@yjqg6666

Description

@yjqg6666

baca book.epub go Error:
ValueError: height and width must be > 0

/home/user/.local/lib/python3.11/site-packages/climage/climage.py:396 in _toAnsi

│ 393 │ │ destHeight //= 2
│ 394 │
│ 395 │ # resize to new size
│ ❱ 396 │ img = img.resize((destWidth, destHeight))
│ 397 │ # where the converted string will be put in
│ 398 │ ansi_build = StringIO()
│ 399

│ ╭────────────────────────────────── locals ───────────────────────────────────╮ │
│ │ color_type = 0
│ │ destHeight = 0
│ │ destWidth = 77
│ │ img = <PIL.Image.Image image mode=RGB size=501x12 at 0x18EE70245F90>
│ │ is_unicode = True
│ │ oWidth = 77
│ │ palette = 'default'
│ │ scale = 6.5064935064935066
│ ╰─────────────────────────────────────────────────────────────────────────────╯

Show the broken cliimage as text instead of panic.

Image

A PR #24 has been made for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions