Page 1 of 1

[Resolved] possible bug mpr IM 6.9.4.9 Mac OSX

Posted: 2016-06-13T18:45:27-07:00
by fmw42
I am not sure if this is a bug.

I am trying to split and image into its 4 quadrants and pad them out to the original size in a transparent background in the proper corners.

input:
Image

This works fine:

Code: Select all

convert -respect-parentheses -size 256x256 xc:none \
null: \( lena.jpg -crop 50%x50% \) -layers Composite \
lena_quads1_%d.png
as does this:

Code: Select all

convert lena.jpg -crop 50%x50% miff:- |\
convert -size 256x256 xc:none \
null: - -layers Composite \
lena_quads2_%d.png

But this fails using mpr: format. Only the last one is placed in the larger transparent area in the correct corner.

Code: Select all

convert lena.jpg -crop 50%x50% -write mpr:quads +delete \
-size 256x256 xc:none \
null: mpr:quads -layers Composite \
lena_quads3_%d.png
Seems like it only gets the offsets from the last layer of the mpr:quads. Is this the way mpr works or is this a bug?

Re: possible bug mpr IM 6.9.4.9 Mac OSX

Posted: 2016-06-16T13:45:30-07:00
by magick
The +delete option only removes one image from the sequence. You likely want this command:

Code: Select all

convert lena.jpg -crop 50%x50% -write mpr:quads -delete 0--1 \
-size 256x256 xc:none \
null: mpr:quads -layers Composite \
lena_quads3_%d.png

Re: possible bug mpr IM 6.9.4.9 Mac OSX

Posted: 2016-06-16T16:08:40-07:00
by fmw42
Thanks you. You are correct. My oversight.