Yes, this is exactly what I needed... I kept thinking the answer was an option/modifier on a command, not chaining multiple commands.
And thanks for the explanation Larry! On Mon, Sep 13, 2021 at 11:52 AM Larry Gritz <l...@larrygritz.com> wrote: > Oh, and here's a version that uses expression substitution, so it will > work regardless of the original resolution: > > oiiotool in.exr --crop "{TOP.width+20}x{TOP.height+20}-10-10" --origin > +0+0 --fullpixels -o out.exr > > > On Sep 13, 2021, at 11:49 AM, Larry Gritz <l...@larrygritz.com> wrote: > > Let's say you have a 1920x1080 image and want 10 pixels of padding all > around. Assuming you want to offset the current image, > > oiiotool in.exr --crop 1940x1100-10-10 --origin +0+0 --fullpixels -o > out.exr > > So this means: > * Read in.exr > * --crop : Adjust the data window to be 1940x1100 with its origin at > -10,-10 -- note that when "crop" specifies a bigger window than before, it > pads with black. > * --origin : The existing pixels stayed where they were and we have > "overscan" now, so assuming we want the new origin to be at 0,0, we set > that explicitly. > * --fullpixels : make sure the "display window" is set to match the data > window. > * output the new image > > Now, if you want the existing image pixels in the data window to remain > where they are, but you want to add black padding around it (and are ok > with "overscan"), then just leave out the --origin part. > > > > On Sep 13, 2021, at 11:19 AM, Larry Gritz <l...@larrygritz.com> wrote: > > Do you want to just grow the pixel/data window with black padding around > the image, possibly ending up with "overscan" data? Or do you want to > *offset* and then pad, so the corner of the new padded image is still at > (0,0)? > > > On Sep 13, 2021, at 11:03 AM, Steven Caron <car...@gmail.com> wrote: > > Hi > > Maybe I am being dense but I can't seem to figure out how to use oiiotool > to pad an image with x number of pixels on the bottom of the image. Or > padding it x number of pixels in any direction or all directions for that > matter. I have tried, fit and crop but I am not able to figure it out. Any > pointers? > > Thanks, > Steven > > > > > -- > Larry Gritz > l...@larrygritz.com > > > > > > -- > Larry Gritz > l...@larrygritz.com > > > > > _______________________________________________ > Oiio-dev mailing list > Oiio-dev@lists.openimageio.org > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >
_______________________________________________ Oiio-dev mailing list Oiio-dev@lists.openimageio.org http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org