Can I use blender as a photo and video viewer?
Blender can be a useful image viewer for some formats like multilayer OpenEXR. I just expanded a bit on Chebhou's answer by creating a python script that calls blender, I expect this can be used on any *nix platform included OSX and possibly even windows.

The script that gets called or set as the application to open image files is -

#!/usr/bin/env python3

from subprocess import call
from sys import argv
import os

sdir = os.path.abspath(os.path.dirname(argv[0]))

calllist = [
    'blender',
    '--factory-startup',
    os.path.join(sdir, 'blend_image_view.blend'),
    '--python',
    os.path.join(sdir, 'blend_open_image_file.py'),
    '--',
    ]

# add the args we get as filenames
calllist.extend(argv)

call(calllist)


The factory-startup and blend file can be removed from the list of options sent to blender. I have blender setup to start with a window that fills two monitors, that doesn't work as well when used as a simple image viewer. I also setup a start file that has two simple layouts for image and movie viewing, leaving a window clear of any excess.

The main working script I adjusted a bit to handle multiple files. When multiple movies are opened I have them in separate channels, with all but the first video muted. I really don't think blender is a good choice for video viewing, this could be improved by adding a way to extract frame rates and resolutions to setup blender to match, which doesn't work well if you open multiple videos with different frame rates and sizes.

import bpy
from sys import argv
import os

# change these two values to match screens names available
# UV Editing
blenderImageScreenName = 'ImageViewer'
# Video Editing
blenderMovieScreenName = 'MovieViewer'

acceptedImgFiles = ['.bmp', '.cin', '.dpx',  '.exr',
                    '.hdr', '.jpg', '.jpeg', '.jp2',
                    '.j2k', '.png', '.rgb',  '.tga',
                    '.tif'
                    ]
acceptedMovFiles = ['.avi',  '.flv', '.h264', '.mov',
                    '.mpeg', '.mpg', '.mp2',  '.mp3',
                    '.mp4',  '.mkv', '.ogg',  '.xvid'
                    ]

fileStartIdx = argv.index('--') + 2
numFilesToOpen = len(argv) - fileStartIdx
showAreaType = 'image'
curChann = 1

for i in range(numFilesToOpen):
    filename = os.path.abspath(argv[fileStartIdx + i])
    ext = os.path.splitext(filename)[1].lower()

    if ext in acceptedImgFiles:
        bpy.ops.image.open(filepath=argv[fileStartIdx + i])
    elif ext in acceptedMovFiles:
        # while we will open video files, blender isn't the best option here
        # When opening multiple videos, each video is imported into a new track
        # tracks after the first will be muted to prevent a terrifying
        # mess of multiple audio tracks
        # end frame is set to the longest video track imported
        # frame rate is left default and will need to be adjusted for each video
        nc = bpy.context.scene.sequence_editor.sequences.new_movie(name=argv[fileStartIdx + i],
                filepath=os.path.abspath(argv[fileStartIdx + i]), frame_start=1, channel=curChann)
        if bpy.context.scene.frame_end &lt; nc.frame_duration:
            bpy.context.scene.frame_end = nc.frame_duration
        # I expected new_movie() to import video and sound
        # but that doesn't happen so we also add sound from the same file
        nca = bpy.context.scene.sequence_editor.sequences.new_sound(name=argv[fileStartIdx + i],
                filepath=os.path.abspath(argv[fileStartIdx + i]), frame_start=1, channel=curChann+1)
        if curChann &gt; 1:
            nc.mute = True
            nca.mute = True
        curChann += 2
        showAreaType = 'video'
    else:
        print("Don't know what type of file this is -",filename)

if showAreaType == 'image':
    bpy.context.window.screen = bpy.data.screens[blenderImageScreenName]
    # make first image active
    for area in bpy.data.screens[blenderImageScreenName].areas:
        if area.type == 'IMAGE_EDITOR':
            area.spaces.active.image = bpy.data.images[0]
else:
    bpy.context.window.screen = bpy.data.screens[blenderMovieScreenName]


Save this as blend_open_image_file.py to match the filename set in the first script.

The list of extensions can easily be extended.

I thought I would keep a copy of this on github which also has the blend file mentioned above if anyone thinks it can be improved.