Page 1 of 1

Tile PNG, Adjoin into PDF - Offset Problem

Posted: 2011-10-10T09:15:21-07:00
by patrickr
Hello

Can anyone explain how to fix the following problem?

I split an image into tiles using:

convert x.png -crop 750x1000 'tiles-%d'

Then I make a pdf where each tile gets a whole page:

convert -adjoin "'tiles-0' 'tiles-1' ..." -units PixelsPerInch -density 100 'pdf:p'

If I use jpgs instead of pngs, this all works fine. But if I use pngs, the image on each page is increasingly offset to the right and down.

I gather ImageMagick can't store offset information in jpgs when tiling, but that it manages to do this for pngs. I assume the solution is to get ImageMagick to ignore offset info in the pngs, or not to create it all. I've tried adding +page and +repage in various places but haven't found the right permutation.

Does anyone know how to change those 2 commands above to fix the problem?

Re: Tile PNG, Adjoin into PDF - Offset Problem

Posted: 2011-10-10T10:48:59-07:00
by fmw42
try

convert x.png -crop 750x1000 +repage 'tiles-%d'

Re: Tile PNG, Adjoin into PDF - Offset Problem

Posted: 2011-10-10T19:24:02-07:00
by anthony
For details see
The Basic Crop Operator...
http://www.imagemagick.org/Usage/crop/#crop