Search code examples
image-processingcommand-lineimagemagickrastergraphicsmagick

Command line tool to export openraster (.ora) files to jpeg/png/etc


Is there a command line script out there to convert openraster (.ora) formatted graphics files to more streamlined image formats (jpeg, png, ...) ? I didn't spot a "go to" option from a cursory internet search.

I tried familiar commands like convert from both the ImageMagick and GraphicsMagick libraries but neither of them have a decode delegate for .ora files yet.

The only one I found so far is calligraconverter from the KDE Calligra suite. It is working ok with some minor hitches (background color confusion). I was wondering if there are other options (present or on the way) or if that is what most use. Example use:

$ calligraconverter --batch some-triangles.ora some-triangles.jpeg
...
$ ls -lh
total 1.2M
-rw-rw-r-- 1 yuvilio yuvilio  66K Nov 18 18:41 some-triangles.jpeg
-rw-rw-r-- 1 yuvilio yuvilio 1.1M Nov 18 16:25 some-triangles.ora
$ 

FYI, my use case is saving space when done writing a "notebook" (bunch of files) with my wacom tablet and drawing programs like mypaint or krita. Since openraster files can get large due to all the versioning and layer information they store, it's preferable to export them if I won't need to edit the originals anymore.


Solution

  • Since the ORA file is actually just a renamed .zip containing a list of PNG, it should be quite easy to get a consolidated PNG out of it. In fact, the specification requires that the ZIP contain a PNG representation of the image in its root called "mergedimage.png," so optimally you could just extract the zip and grab that.