Page 1 of 1

New Program

PostPosted: 04 Nov 2010, 13:43
by Burnf
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.

Re: New Program

PostPosted: 04 Nov 2010, 16:02
by Burnf
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..

Re: New Program

PostPosted: 04 Nov 2010, 18:49
by Snacko
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.

Re: New Program

PostPosted: 04 Nov 2010, 23:26
by Burnf
Don't suppose someone could help me make that script? Snacko is busy, but maybe some others are out there could help?

Re: New Program

PostPosted: 08 Jan 2011, 18:33
by Burnf
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.

Re: New Program

PostPosted: 13 Jan 2011, 06:16
by Huggybaby
I'm afraid until someone steps up to help Snacko, or writes another app, you'll have to keep your fingers crossed. :(

Re: New Program

PostPosted: 22 Jan 2011, 05:12
by nayo
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 :)