How to offset image contents by X,Y pixels using ImageMagick?
<p>I need to offset the pixels in a PNG image by -1 in X and -4 in Y axis.</p>

<p>The images were converted from a PDF created by Corel Draw, which adds an offset, breaking the image processing system I'm working on.
align_image_stack from hugin-tools package crashes when processing these files, that's why I resort to trying a fixed offest correction.</p>

<p>I tried this these commands:</p>

<pre><code>$ convert a.png: -geometry 100%-100-100 b.png

$ convert -region '100%+500px+100px' a.png b.png

$ convert -page '100%+500px+100px' a.png b.png

$ convert -repage '100%+500px+100px' a.png b.png

$ convert -crop '100%+500px+100px' a.png b.png

$ convert a.png -geometry 100%-100px-100px b.png
</code></pre>

<p>They have all finished without an error, but the gave me the same image I fed them as input.</p>

<p><strong>a.png = b.png</strong></p>

<p>What am I doing wrong? Why the Covert command does not shift the image contents?</p>

<p>EDIT:</p>

<p>Here's a pair of images to illustrate my problem. The first image is what  I want, the second is what comes out of Corel Draw, I want to apply an arbitrary X/Y offset to compensate for this difference. The images are faked only to illustrate the problem, this is not authentic data.</p>

<p><a href="https://i.stack.imgur.com/SrZfb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SrZfb.png" alt="Two images"></a></p>

<p>New point is that I was able to produce the offset <strong>once</strong>, but I can't reproduce this. It looks to me like a bug in ImageMagick, because I'm trying the same command that I used before and it doesn't work now.</p>

<p>I also tried using GraphicsMagick to doublechek this.</p>

<p>I was able to get an offset written to PNG header, but that doesn't make Blender use that offset, so I need to "burn" that offset into the bitmap data, not just specify it in the metadata.</p>

<p>This command did a change, but only GIMP seems understands that and I need to make Blender apply the offset:</p>

<pre><code>convert a.png -repage '100%x100%+100+1000' b.png
</code></pre>

<p>I tried using -sample to apply the transformation, but it's not alpplied and stays in the metadata - I can check this with GIMP.</p>

<pre><code>convert a.png -repage '100%x100%+100+1000' -sample 100% b.png
</code></pre>

<p>I can't believe I am unable to do such a simple thing.</p>