#Who needs a GUI anyway?
Most people like GUIs.
You don't.
They say that GUI's show them pretty pictures.
##Your task:
Write a program that displays said image in full 256-colour ANSI art in the terminal. Because you need to show them your leet skillz at programming, you have decided to write this as short as possible. "That's a program?" - Some user
#Challenge
Given input from stdin or the command line of an image filename, the program must output it to stdout in ANSI.
To output a string in green (#00FF00), you can print
\x1b[48;5;46mInsert text here!where\x1bis codepoint 27 (hex 1b).\x1b[48;5;<bgcode>msets the colour.At the end of each line, the colour formatting should be reset so not to make the output look ugly on terminals with a resolution higher than 80x24 set.
Your program must support at least one of the following image file formats: PNG, JPG, BMP, PPM, SVG
You may use image processing libraries to parse images.
The output must be viewable in any terminal sized over 80x24.
If the longest side is the x-axis, its length must be resized to 80.
If the longest side is the y-axis, its length must be resized to 24.
The aspect ratio of the image must be kept the same. Scale using
min(80/X,24/Y), rounding downThe output can be assumed to be a console that supports ANSI.
Each character of the resized image represents 1 pixel.
The characters printed must be a space.
The colour for an individual pixel must be the closest available colour in the colour map (Text version in wikipedia link above).
In this case, the similarity of 2 colours can be defined as:
((R1-R2)^2+(G1-G2)^2+(B1-B2)^2)^0.5where results closer to zero indicate closer similarity.If your image format supports the alpha channel, you may assume it is empty/doesn't exist.
##Example
Found here is our beloved logo. This hexdumpThis hexdump is what your program should output given that image as an input.
This is a code golf, the answer with the shortest answer in bytes wins!
