It is currently 16 Aug 2018, 02:11
   
Text Size

New Program

by Nate and Snacko

Moderators: Snacko, CCGHQ Admins

New Program

Postby Burnf » 04 Nov 2010, 13:43

Programs like these are only as useful as they are updated. While I am deeply grateful for all the work done on this program over the years, it seems that support has dwindled. In part, the developers of magic have been making card's more and more varied, making tasks like this program more difficult to keep up with. Perhaps it's time to make a more fool proof program that doesn't require lengthy updates.

I propose a parser that merely takes a deck file and uses the set abbreviation with the card name to search the pics directory to find, resize and tile full art card images onto a printable page. This approach wont require updates and will produce good cards when used in conjunction with the high quality pics available through the pics forum on this site. The information needed to generate pages would be limited to only the last couple sections of the current config file (spacing, borders, art directory, etc..).

Sadly I'm not savvy enough to do this on my own, but perhaps with some direction I could. The hardest trick is resizing every image to be the same resolution.

P.S. I don't mean this thread as any insult to the effort that you've put forth so far. I am merely proposing this as a means for some of us more veracious users to gain access to the latest releases without the need to pester for updates.

P.P.S. Potentially this could be incorporated into the current card generator, so that any unrecognized set defaults to searching the set directory for the full art instead of erroring out. This could also be enabled for mechanics that are not currently supported or have less than optimal results (like levelers, planeswalkers {cropped art being stretched to full card size} and Eldrazi {see through}) through the config file.
Burnf
 
Posts: 130
Joined: 06 Mar 2009, 15:16
Has thanked: 0 time
Been thanked: 0 time

Re: New Program

Postby Burnf » 04 Nov 2010, 16:02

So looking at the convertor.php.

-The dec2csv function checks to see if it can open and if it can output the deck.
-It then makes an array to receive the deck cards.
-//Read header gets the card count for the deck
---not quite sure how the freed() function works. I'm guessing the number in its variables defines a column? Need to look at a deck structure to be sure.
-//Read deck cards it does a for loop equal to the number of cards
---It uses a fread column (?) 2 to set the input to column 2 then grabs the integer (likely card count?)
---Another fread to set something to 10 then check to see if the card is in the database.

So... not quite sure how that works. The incrementing i value doesn't seem to affect anything inside the script, so without knowing how fread works, it would seem to just be reading the same values repeatedly. But anyways, at this point in the script, I think if you changed the "unable to find card with ID: $id\n"; to a script to just plug the card name and set, it would stop new sets from erroring out the process.

Now... if I can just find the part that parses the deck csv, I might be able to partially figure out what needs to happen to get that to just grab the card image..
Burnf
 
Posts: 130
Joined: 06 Mar 2009, 15:16
Has thanked: 0 time
Been thanked: 0 time

Re: New Program

Postby Snacko » 04 Nov 2010, 18:49

For simple printing of full images I prefer Imagemagick. You can run two simple commands
convert -filter Lanczos -resize 700x994 -bordercolor black -border 22x22 *.jpg resized_picture.png
montage -density 300 -tile 3x3 -geometry +2+2 *.png montage.png
This has one advantage that it uses Lanczos resizing which has better quality, however you have to manually prepare the needed images in as many copies as needed. This could be automated with a simple script that fetches the images from a deckfile.

I could write such script at some point if there's some need for it based on the above software, however don't expect it soon as I got very little time as you can see with the updates of deckbuilder and cardgen.

Actually Decklist.php parses the csv decks.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 73 times

Re: New Program

Postby Burnf » 04 Nov 2010, 23:26

Don't suppose someone could help me make that script? Snacko is busy, but maybe some others are out there could help?
Burnf
 
Posts: 130
Joined: 06 Mar 2009, 15:16
Has thanked: 0 time
Been thanked: 0 time

Re: New Program

Postby Burnf » 08 Jan 2011, 18:33

Anyone still around?

Now would be a good time to make this program. The new set is due soon, so we'll need updates anyways in a month and a half.
Burnf
 
Posts: 130
Joined: 06 Mar 2009, 15:16
Has thanked: 0 time
Been thanked: 0 time

Re: New Program

Postby Huggybaby » 13 Jan 2011, 06:16

I'm afraid until someone steps up to help Snacko, or writes another app, you'll have to keep your fingers crossed. :(
User avatar
Huggybaby
Administrator
 
Posts: 3072
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 567 times
Been thanked: 570 times

Re: New Program

Postby nayo » 22 Jan 2011, 05:12

pity for no updates, but awersome basically every hard to find card can be made with up to date text...
which is the best choice for me...

so... i think is better if you can generate on the fly an oracle up to date version of an old old old expansion card ^^
also in another language too :P

those 2 things really place the crop method 2 steps futher th full pic method :)
nayo
 
Posts: 7
Joined: 22 Jan 2011, 05:01
Has thanked: 0 time
Been thanked: 0 time


Return to HQ Card Generator

Who is online

Users browsing this forum: No registered users and 2 guests


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (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: No registered users and 2 guests

Login Form