4

I am simply trying to use aview to display a simple JPEG image using the terminal, however every time it returns this error:

Invalid magic-not p?m family format

It happens with other files of other formats too; I am not sure what the issue could be, and searching the error doesn't help much.

I am running Xubuntu 12.04 and using zsh as my shell.

6

You could use asciiview command, from man aview:

aview can only show files in the PNM file format. But asciiview automatically converts the file formats to PNM (with extern programs like NetPBM and ImageMagic) and then runs aview.

So just use:

$ asciiview file.jpg

In case it doesn't work you might need to use:

$ sudo apt-get install imagemagick
  • As it's the right answer to the question, I'll add a comment: if you want the same effect as asciiview without the need for imagemagick and have fun with colors too, switch to caca-utils package and its viewer tool: cacaview. – Yvan Nov 14 '17 at 9:38
4

Option 1) Convert it to pgm.

convert file.jpg file.pgm

Of course convert must be installed.

Then:

aview file.pgm

Option 2) You can simply do:

asciiview file.jpg
  • 1
    Although this is a suitable workaround, this doesn't answer the question asked. – devnill Jan 8 '14 at 22:00
  • What question?  I don’t see a question. (I see a bunch of statements, including “I am not sure what the issue could be”, but no question.) – G-Man Says 'Reinstate Monica' Jan 20 '18 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.