It is currently 11 Dec 2018, 06:57
   
Text Size

Imagemagick script for printing proxies

Anything that doesn't belong elsewhere goes here...

Moderator: CCGHQ Admins

Imagemagick script for printing proxies

Postby olze » 04 Jun 2009, 16:38

Hello,
I would like to share some of my findings
Feel free to comment, improve, post your own tips !

Aim: printing numerous proxies from HQ pictures
Methods:
- transformation of the HQ pictures so that their print size matches the size of a real mtg card,
- creation of N "contact-sheet"-like pages (A4 format) with 9 cards on each,
and (optional),
- creation of a multi-pages PDF file ready to be carried on a USB drive to your favorite 'print-shop'
Tools:
You may use two softwares. Either Imagemagick (natively installed on my Ubuntu distrib) or Graphicsmagick for Windows.

Command-lines:
1)convert -filter Lanczos -resize 744x1038 *.jpg resized_picture
2)montage -density 300 -tile 3x3 -geometry +2+2 *.jpeg montage.jpg
3)convert montag*.jpg montage.pdf

Explanations:
The convert instruction is used to change the number of pixels of the original file to a number of pixels that will produce a picture of the size of a conventional mtg card when printed at the 300 DPI resolution. A mtg cards measures 2.48x3.46 inches. At 300 DPI it gives 2.48x300=744 pixels. If the original number of pixels of the picture is less than 744, it means that the program will enlarge the picture. According to the Imagemagick's manual, the filter 'Lanczos' is a good comprise (time/result) for this transformation (see filters in IM).

The montage instruction is used to create a contact sheet of card pictures arranged in 3 rows and 3 columns (option tile), separated by 2 pixels (option geometry), at a resolution of 300 DPI (option density). For each pool of 9 cards (3 by 3 cards) you will obtain a file named 'montage-X.jpg'. X increases from 0 to a multiple of 9 depending of the total number of card pictures you have in the directory.

The last line make the program create one PDF file gathering all the contact sheets created before.

Weblinks for the softwares:
Imagemagick: http://www.imagemagick.org
Graphicsmagick: http://www.graphicsmagick.org/
olze
 
Posts: 5
Joined: 04 Jun 2009, 14:18
Has thanked: 0 time
Been thanked: 2 times

Re: Imagemagick script for printing proxies

Postby Huggybaby » 04 Jun 2009, 18:30

Nice, thank you.
User avatar
Huggybaby
Administrator
 
Posts: 3077
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 574 times
Been thanked: 572 times

Re: Imagemagick script for printing proxies

Postby doxaios » 05 Jun 2009, 17:03

I asked this and in printer topic but if you know how to solve my problem let me know. I print the front side but when I put the page oposite down to prin the back side EVERYTIME is a little bit offset...I tried both A4 layout and exact the 9 cards per page but always is this issue... #-o #-o #-o #-o
User avatar
doxaios
 
Posts: 164
Joined: 20 Aug 2008, 15:40
Has thanked: 13 times
Been thanked: 1 time

Re: Imagemagick script for printing proxies

Postby Huggybaby » 05 Jun 2009, 22:19

Is the offset left to right or top to bottom?

If it's left to right, then the paper guides aren't centered properly.

If the offset is top to bottom, how do you turn the paper over? Hopefully not end over end. The end of the page that goes in the printer first on page one should be the same for side two.
User avatar
Huggybaby
Administrator
 
Posts: 3077
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 574 times
Been thanked: 572 times

Re: Imagemagick script for printing proxies

Postby doxaios » 06 Jun 2009, 05:50

It is left-right. I went to a prof. shop for digital copies but the problem remains..I dont know what to do.In adobe photoshop you press File->New. Then what do you select?
User avatar
doxaios
 
Posts: 164
Joined: 20 Aug 2008, 15:40
Has thanked: 13 times
Been thanked: 1 time

Re: Imagemagick script for printing proxies

Postby Huggybaby » 06 Jun 2009, 16:16

It's clear your layouts aren't centered perfectly then. I don't know Photoshop, maybe someone here can give you a template, or examine yours for you.
User avatar
Huggybaby
Administrator
 
Posts: 3077
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 574 times
Been thanked: 572 times

Re: Imagemagick script for printing proxies

Postby doxaios » 06 Jun 2009, 16:50

If someone could give me a layout/template please send me a pm
User avatar
doxaios
 
Posts: 164
Joined: 20 Aug 2008, 15:40
Has thanked: 13 times
Been thanked: 1 time

Re: Imagemagick script for printing proxies

Postby Snacko » 15 Jun 2009, 16:01

I used this method for printing tokens, however you might want to use something lossless like png in the intermediate steps as with jpeg you loose a bit of quality in each step 1&2.

Also I'm not sure how does the -border functionality in imagemagic work, but you could add bigger black borders and enlarge less to get more proper card printed.

edit.

I used this command to extend the black borders (I work with png to not recompress the files)

convert -filter Lanczos -resize 700x994 -bordercolor black -border 22x22 *.jpg resized_picture.png
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 73 times

Re: Imagemagick script for printing proxies

Postby olze » 17 Jun 2009, 09:06

Thanks for the input Snacko !

Indeed, the method I used is not perfect because the final size does not match exactly the real size of a Magic card due to smaller black borders.
I didn't see the option -border, great !
Do the dimensions that you give (ie -resize 700x994 and -border 22x22) lead to a final print size matching the real card size ?

As for the use of png picture format, does that make sense to use it since the first file is in jpeg (in terms of quality)? If it increases substantially the filesize it might ask to much cpu for my computer...

Anyway, I'll test that soon.
olze
 
Posts: 5
Joined: 04 Jun 2009, 14:18
Has thanked: 0 time
Been thanked: 2 times

Re: Imagemagick script for printing proxies

Postby Snacko » 17 Jun 2009, 09:29

If you can live with the data loss with each jpeg recompression you can leave out png / any other lossless format.

With jpeg it like:
input (jpeg, 100% orgnial quality)->resize/borders(90% of 100% orginal quality)->lay them out (90% of 90% of 100% quality).
So with each step you loose out a bit of the orginal jpeg.

I measured the cards with a ruler and those dimensions pretty much fit the real card size @ 300dpi.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 73 times

Re: Imagemagick script for printing proxies

Postby olze » 17 Jun 2009, 09:55

Thanks for the details !
I went rapidly through the "HQ Card Generator" page using the link in your signature ... I only discover it now... especially the generatePages.bat which should do the job if I understood correctly (?)
I realize that my post was useless :oops: ...
Damn it... I worked on it for days ... #-o

Anyway, great work, I'll go deeper and test your software now.
olze
 
Posts: 5
Joined: 04 Jun 2009, 14:18
Has thanked: 0 time
Been thanked: 2 times

Re: Imagemagick script for printing proxies

Postby Snacko » 17 Jun 2009, 10:37

Those are two methods that don't necessarily produce the same output.

When printing the scans you get cards which look and feel 100% how they were printed by WotC, while using a card generator you get similar (or really close) looking card with Oracle text.

It really comes down to whether you want 100% exact card look or get updated text / maybe some more detail that was lost while scanning.

You can read more about the HQ Card Generator http://www.slightlymagic.net/hqpics/4-mtg/13-hqcg and there's a subforum here! viewtopic.php?f=30&t=465
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 73 times

Re: Imagemagick script for printing proxies

Postby Nate » 22 Jul 2009, 05:40

Doing it from the command line with imagemagick is pretty neat! As Snacko mentioned, it isn't quite the same as using full card scans. You may think it is better or worse. The card generator can't do some special frames like tokens.

I use the card generator to make pages of cards arranged 3x2, then a third row containing two cards rotated 90 degrees. I print them on card stock using an Epson printer with a straight through paper path. I then have an Accucut roller-type paper cutter and I use a custom made die cutter to cut out the cards with rounded corners. When placed in sleeves they look identical to the real deal!

The whole setup was pretty pricey. A friend and I went in on it all, here are all our costs:
Printer $320
Cutter: $390
Die: $139
Each sheet of paper (8 cards): $0.136
Each ink set (prints ~200 sheets): $65
Each sleeve: $0.029333
Each deck box: $1.20

For a 75 card deck, it costs $7.72 for the cards, sleeves, and deck box. Without sleeves or deck box it drops to $4.32. So it is pretty cheap if you ignored the cost of the printer, cutter, and die (which do have resale value).

It takes a long time to print, as each sheet has to be manually fed into the printer. Cutting is fast, but one mistake and a whole sheet can be ruined. We've made probably 30 decks with the setup so far, all for personal use. It is too time consuming to make other people decks.
Nate
DEVELOPER
 
Posts: 29
Joined: 26 Aug 2008, 19:13
Has thanked: 0 time
Been thanked: 1 time

Re: Imagemagick script for printing proxies

Postby doxaios » 22 Jul 2009, 13:49

Nate wrote:I use the card generator to make pages of cards arranged 3x2, then a third row containing two cards rotated 90 degrees. I print them on card stock using an Epson printer with a straight through paper path.
I cant understand what you do. Could you explain it a little bit more and upload a sample if you can?
User avatar
doxaios
 
Posts: 164
Joined: 20 Aug 2008, 15:40
Has thanked: 13 times
Been thanked: 1 time

Re: Imagemagick script for printing proxies

Postby staggerwingjtstw » 23 Jul 2009, 05:40

I think he means it looks like this, with dashes representing cards

| | |
| | |
-- --

That might be sideways....
I like being bad... it makes me happy...
User avatar
staggerwingjtstw
 
Posts: 181
Joined: 31 May 2008, 18:03
Has thanked: 3 times
Been thanked: 1 time

Next

Return to Off Topic Discussion

Who is online

Users browsing this forum: Williamantus and 1 guest


Who is online

In total there are 2 users online :: 1 registered, 0 hidden and 1 guest (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: Williamantus and 1 guest

Login Form