Scaling up ora files?

Tags: #<Tag:0x00007f483dcdf050> #<Tag:0x00007f483dcdef88> #<Tag:0x00007f483dcdeec0> #<Tag:0x00007f483dcdedf8>

I’ve got a picture that uses groups, vector layers, destination-in and hard-light blend modes (and lots of normal ones of course) and now I’m in the tricky situation of wanting to scale it up and render out the upscaled version as a png.
I want to scale the rastor layers using cubic interpolation and the vector layers (some of which are masks, some of which are inks) using, of course, normal vector scaling.
The problem is that even if I could do it in the zip file itself, upscaling every raster layer and vector layer and editing the stack.xml, I’d still have to open the upscaled version and convert it to a png somehow − and this image is stretching the limits of my old computer as it is. Any ideas?

tl;dr: I can maaaybe figure out how to scale the ora file up, but then I’d need to render it out to a png somehow, after it becomes huge and cumbersome… mypaint doesn’t have a batch mode, right?

Yeah, MyPaint doesn’t have batch tools. It dose however allow you to export each layer as a separate PNG file.

@achadwick do we have a tool that allows us to pack and unpack ora files?

If we do, you could create a script that unpacks the ora, use a batch program to to resize and repack it. It should be simple to accomplish if u are using Linux.

@odysseywestra
It’d be great if someone could patch up general image workhorses like graphicsmagick or imagemagick to work directly with layered OpenRaster files. For now though, somebody could write an oramogrify script to walk mogrify or gm mogrify through the leaves of the OpenRaster file then repack it all. They claim SVG support!

You’d lose the MyPaint strokemap and any other fancy features that MyPaint embeds.

I’d need to render it out to a png somehow, after it becomes huge and cumbersome… mypaint doesn’t have a batch mode, right?

Not yet, but the ability to convert OpenRaster to PNG on the command line would be a really nice feature to request over on the bug tracker.

Yeah, in the past I’ve used mogrify/convert on a layer by layer and edited stack.xml and I could figure out something similar now (if IM/GM can’t handle svg, that’s no problem, I could use xmlstarlet).

The problem is more rendering out the ora to png because I’m using (and loving) non-normal blend modes. Destination In and Hard Light.

I’ll go over to the bug tracker to request.

For now, here’s my idea for a workaround. From within mypaint, I’ll try to separate out an raster image with all the “paint” and a vector image with all the “ink”. Then I can scale them with GM/Inkscape and multiply them with GM. Even though the “paint” layers depend on vector layers as masks, those boundaries will be beneath the “ink” anyway.

Oh, it’s not easy lining everything up, getting the edges to look right etc.

Old Q, if you found a solution please share!

If you didn’t, have you tried using Gimp for that? It would require some script to do the job from the command line.
I think current gimp has out-of-the-box support for ORA. For older versions there’s a plugin available.*

(Krita can convert .ora to .png from the command line, but i haven’t found any way of batch-resizing with it.)

Info on scripting on the gimp docs and elsewhere on the web.*

A lot easier, if it meets your requirements, could be using this gimp plugin: http://registry.gimp.org/node/26259 and http://www.alessandrofrancesconi.it/projects/bimp/

  • can’t post more than two links (limit for new-users, apparently)

That was my first stop before going here :smiley:
GIMP’s ora support doesn’t cover vector layers and the special blend modes (Destination In being my favorite but also Hard Light) that mypaint has.

The solution I went with was to pre-render all the non-vector layers (that meant sacrificing my vector masks :frowning:) and then align this merged raster layer with the vector layers in Inkscape and use Inkscape to scale it up.

This didn’t give the best results so I’m still stoked if there could be an all-ora solution.
Also, scaling down… Inkscape weirdly enough doesn’t look that good when scaling down or even at its native resolution. The renderer, atleast in the old version of Inkscape I had, isn’t that great. For another project where I wanted the image to be smaller, not bigger, I used Graphics Magick to scale it down after testing both GIMP (including both Linear and Cubic modes) and Inkscape, finding that GM got the best results.

I finally solved this long-standing wishlist item for myself♥

It’s a stand-alone program in chicken scheme,
git clone https://idiomdrottning.org/ora_rescale

Kinda messy if you’re not used to compiling Chicken stuff but it does the job T_T

1 Like