yacine204/ascii.png — reverse-engineered prompt
Reverse engineered prompt
Build me a small C command line image viewer that can open both PNG and JPG files and draw them directly in the terminal. I want it to detect the format automatically, decode the image data itself instead of relying on an image library, and render in full color using ANSI colors and Unicode half block characters so the output looks as detailed as possible in a normal terminal.
It should handle the usual PNG filters and basic JPG decoding steps well enough to display real images correctly, including common chroma subsampling. Please make it scale to the current terminal size automatically, and keep the interface simple, something like passing an image path with an optional verbose flag and an optional output file name. In verbose mode, print useful parsing and decoding info. Also add the ability to save the decoded result as a PPM file.
Please include a straightforward build command and make sure there are a few sample images or tests to show it working. If you need to, look up current format details online.
Want more depth? Deep Reverse