Skip to content

ORA format support #2050

@tomaszg7

Description

@tomaszg7

ORA (OpenRaster) is a format used by some image editors and painting tools like Krita or Mypaint. It is not widely supported.

I'd like to share two trivial scripts to preview these files with Geeqie using external preview extraction feature. Apparently it is very simple, I'm following a hint from https://community.mypaint.app/t/ora-image-viewer/385/6. The scripts are easy modifications of the ones given in documentation https://www.geeqie.org/help/GuideOptionsAdvanced.html. Maybe it would be useful for somebody to include them as examples there as well.

identification

#! /bin/bash

        filename=$(basename -- "$1")
        extension="${filename##*.}"

        shopt -s nocasematch
        if [[ $extension == "ORA" ]]
        then
        if unzip -l "$1" | grep mergedimage.png > /dev/null
        then
        exit 0
        else
        exit 1
        fi
        else
        exit 1
        fi

extraction

#! /bin/bash
          unzip -p "$1" mergedimage.png > "$2"

BTW. I think the external preview extraction feature could be made much more robust. Something like the table in file filter with a list of extensions and associated decoders would be easier to use. Trivial identification by extension would be then made inside Geeqie, and more serious check might be a part of decode script: by checking the return code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions