6

At the moment I'm working with a lot of SVG files and I don't have a good tool to inspect this files.

Normally I use feh to take a look at an image, but feh can't show SVG files. Now I'm looking for a replacement. The replacement should have all the features of feh and should be able to open SVG files. Especially the following features are mandatory

  • simple feh like GUI
  • the tool should be designed for the use in a shell
  • $command ~/image1.svg image2.jpg should only open these two files not the directory ~/
  • support multiple image formats
  • small memory footprint and not to many dependencies

I know the Eye of GNOME (eog) does all this, but it is a GNOME tool and as such it needs to many GNOME dependencies.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Raphael Ahrens
  • 9,701
  • 5
  • 37
  • 52
  • Most web browsers will display SVG files. I know Firefox will, because I do it all the time. – Tim Sep 26 '13 at 01:23

4 Answers4

8

I got feh to work with svg by:

  1. downloading imagemagick
  2. adding --magick-timeout 1 to the command line. Not very obvious, but that's what gets it to work...

    feh --magick-timeout 1 ~/image1.svg image2.jpg

operalala
  • 371
  • 1
  • 3
  • 9
  • This is awesome! But with my version of `feh` the option should be `--magick-timeout 0` so it doesn't stop after one second of conversion and instead tries indefinitely. – Raphael Ahrens Jan 08 '14 at 19:34
  • What do you mean by downloading imagemagic? –  Aug 20 '19 at 09:26
  • 4
    Got `feh WARNING: --magick-timeout is deprecated, please use --conversion-timeout instead` message, so `feh --conversion-timeout 1 ~/image.svg` is the way to go. – im.pankratov Dec 22 '19 at 09:08
4

With recent versions of feh, you should be able to do feh --conversion-timeout 1 file.svg.

Simple way to make feh work with everything is to create an alias on that, so it either natively display the file if it's a normal image .png, '.jpg' etc, or converts it if it's an SVG.

alias feh='feh --conversion-timeout 1'

Note that you need to have imagemagick installed on your system for it to work.

Preview
  • 158
  • 5
2

You can try Mirage, which supports png, jpg, svg, xpm, gif, bmp, tiff, and others.

MBR
  • 912
  • 10
  • 17
  • Mhh Mirage has a nice GUI, but it fails criteria 3. When I execute `mirage ~/image1.svg image2.jpg` it shows all loads all images in `~` and in `.`. Do I need to set a flag or something to just open these two images? – Raphael Ahrens Sep 26 '13 at 04:51
  • No you're right, it fails on this criterion. – MBR Sep 26 '13 at 08:05
1

GUIs

I'm familiar with geeqie (a fork of GQView). It has pretty broad support of file formats. There are actually several that carry support for SVG. Rather than list them all here I'm going to refer you to the very well maintained Wikipedia page on the subject, titled: Comparison of image viewers.

This page contains several tables, one of which is the list of file formats that the different Linux image viewers support.

When looking for guidance on this type of question, I often refer to that list when looking for a viewer with support for format X.

Command line tools

Probably the easiest tool to use that supports displaying the SVG format is ImageMagick. It includes a tool called simply display that can handle pretty much any image file format you can throw at it, including SVG.

You can check out the complete list of supported image formats, as well as, summoning it from the command line, using another of ImageMagick's tools, identify:

$ identify -list format | grep -i svg
     MSVG  SVG       rw+   ImageMagick's own SVG internal renderer
      SVG  SVG       rw+   Scalable Vector Graphics (RSVG 2.32.0)
     SVGZ  SVG       rw+   Compressed Scalable Vector Graphics (RSVG 2.32.0)

I was able to display this sample image, just fine.

slm
  • 363,520
  • 117
  • 767
  • 871
  • First of all thanks for your answer. `geeqie` seems to do most of what I asked. But I'm not happy with there layout. I'm looking for a more minimalist tool like `feh`. I checked your list and most of the programs suffer the same problem. I will look if I can get accustomed to `geeqie`. For now I will leave this question open. – Raphael Ahrens Sep 26 '13 at 05:43
  • 1
    @RaphaelAhrens - if it makes you feel any better I don't like it's layout either. If you just want a modest command line tool I believe ImageMagick's `display` command can display .svg files too. – slm Sep 26 '13 at 12:07
  • `display` is a really good tip. – Raphael Ahrens Sep 26 '13 at 12:37
  • 1
    geeqie's svg support is incomplete. at the very least it does not support the image tag inside an svg – Catskul Jul 09 '18 at 17:06