Skip to content

Commit

Permalink
image2xterm: pillow's ANTIALIAS constant was removed (and drop py2)
Browse files Browse the repository at this point in the history
  • Loading branch information
hydrargyrum committed Feb 13, 2025
1 parent b664072 commit e004730
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions image2xterm/image2xterm
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ Other terminals do support these 256 colors escape codes, e.g. roxterm, xfce-ter
__all__ = ('make256xterm', 'imageRGB_to_256', 'image2xterm', 'image256_to_ansi')


if sys.version_info.major == 2:
range = xrange


def make256xterm():
"""Return a [r, g, b, r, g, b, ...] table with the colors of the 256 xterm colors.
Expand Down Expand Up @@ -111,7 +107,7 @@ def image2xterm(imagepath, newsize=(80, 24), halfblocks=True, truecolor=False):
targetsize = targetsize[0], targetsize[1] * 2

image = image.convert('RGB')
image = image.resize(targetsize, Image.ANTIALIAS)
image = image.resize(targetsize, Image.LANCZOS)
if not truecolor:
image = imageRGB_to_256(image)
return image_to_ansi(image, halfblocks=halfblocks, truecolor=truecolor)
Expand Down

0 comments on commit e004730

Please sign in to comment.