Convert image to raw RGB bytes:
python3 -c "import sys,PIL.Image;sys.stdout.buffer.write(PIL.Image.open(sys.stdin.buffer).resize((324, 324)).convert('RGB').tobytes())" <lena.png >lena_224x224.binDisplay raw RGB bytes:
python3 -c "import sys,PIL.Image;PIL.Image.frombytes('RGB',(324, 324),sys.stdin.buffer.read()).show()"