Guillotine Script for all layers - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions) +--- Thread: Guillotine Script for all layers (/Thread-Guillotine-Script-for-all-layers) |
Guillotine Script for all layers - mwaxman1 - 01-22-2018 I have downloaded a deck of playing cards that has been printed to 151 pdf files, each with 9 cards printed in a 3x3 grid. I need to separate each card on all of the PDFs into separate images, so I can send each individual card image to a card deck printer. I have gotten as far as combining all pdf files into a single PNG, with each 3x3 page as a separate layer. I have setup guillotine and/or web slice to pull apart the pictures correctly on the first layer. Is it possible to script either of these so they cut the same 3x3 grid out of all 151 layers and save each individual card as a seaparate .jpg? RE: Guillotine Script for all layers - rich2005 - 01-22-2018 I think for something like that I would use the command line application ImageMagick http://www.imagemagick.org Starting with the PDFs in a 'clean' project folder. Start your terminal there. I am just using 2 PDF as an example. 1. Convert the PDfs to pngs - the 300 is for 300 ppi %03d is the file name 000.png etc Code: magick convert -density 300 *.pdf %03d.png screenshot: https://i.imgur.com/8hWcTQ1.jpg 2. Check the size of the png image for dividing into 3x3 Code: magick identify 000.png screenshot: https://i.imgur.com/nPfecpR.jpg 3. Dividing those sizes by (900x1200) 3 to get a command to get individual parts (300x400) as jpeg images Code: magick convert *.png -crop 300x400 tile-%04d.jpg screenshot: https://i.imgur.com/jiGgcfd.jpg RE: Guillotine Script for all layers - Ofnuts - 01-22-2018 Another solution with ofn-tiles: 1) Use ofn-tiles to load the PDFs 2) Use ofn-tiles giving the card size, to export the cards to individual files Potential hazards:
|