dominiontabs icon indicating copy to clipboard operation
dominiontabs copied to clipboard

Better images

Open mbbush opened this issue 7 months ago • 13 comments

I'm doing a bunch of work to update all the cards with the latest errata, and make other improvements (see #574, among others). One thing that's bugging me is the way the icons for debt, coins, potions, and VP look, and I'd love for someone to give me a hand with them.

Currently, the code uses the files in https://github.com/sumpfork/dominiontabs/tree/master/src/domdiv/images for the images that are rendered inside the card text and rules.

For the Cost icon on the top of the tab, it always uses https://github.com/sumpfork/dominiontabs/blob/master/src/domdiv/images/coin.png (which is higher resolution than the -small images), and then overlays the number on top of it, in the same font used for dominion, with a bunch of fiddly little optimizations for handling things like "the number 4 is slightly smaller". It looks beautiful. Unfortunately, the code would be quite hard to reuse in a scenario where we don't know the exact size or placement ahead of time (when we're putting them in the middle of a sentence in the rules).

I'm hoping someone would be willing to:

  • Generate new images for the cost icons for each coin and debt value, that are square (don't have the extra whitespace currently on the right-hand side of most of them) and have a transparent background.
    • A slightly higher-resolution base debt icon would be great. I think there's one on the dominionstrategy wiki that we could use.
    • The easiest "dumb way" I can think of to do this would be to install the custom fonts, edit the card costs in the card db so you could get one card with each cost, run the code with --tabs-only --no-tab-artwork --cardlist some-file.txt --order cost, and then snip out the rendered images from the PDF.
  • Re-do the VP symbol images, which currently look cut off on the bottom, and look especially bad when drawn large on e.g. Province.

It's possible I might get around to doing this myself eventually, but if anyone is willing to help out, it would be great.

I tried reusing the images like https://wiki.dominionstrategy.com/images/thumb/3/32/Coin3.png/24px-Coin3.png, but the ones this code renders for cost looked a lot better.

mbbush avatar May 21 '25 22:05 mbbush

I like this idea and would suggest just writing a separate script to generate high res images. I think it would produce better results and be easier to maintain in the long run than cropping a bunch of cost out of cards.

I would enjoy an exercise in image processing to pre-generate a bunch of cost and debt images but I'm also busy at work and moving so won't be able to get to it anytime soon.

nickv2002 avatar May 22 '25 16:05 nickv2002

in what size or resolution you want those images? i cut out for example the coin from gold (as shown in dom.wiki) is 504*482

Image

if higher res is needed let me know.

GinoGR1971 avatar May 26 '25 05:05 GinoGR1971

Gino: That's more than large enough for the icons shown on the dividers. Thanks!

nickv2002 avatar May 26 '25 08:05 nickv2002

work in progress: size and/or resolution good enough?

Image

Image

GinoGR1971 avatar May 27 '25 06:05 GinoGR1971

Victory icons

Image Image Image Image

GinoGR1971 avatar May 27 '25 13:05 GinoGR1971

Debt

Image Image Image Image Image Image Image Image Image Image

GinoGR1971 avatar May 27 '25 13:05 GinoGR1971

Coins

Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image

GinoGR1971 avatar May 27 '25 13:05 GinoGR1971

Image

GinoGR1971 avatar May 27 '25 13:05 GinoGR1971

banners

Image Image Image Image Image Image Image Image Image Image

GinoGR1971 avatar May 27 '25 13:05 GinoGR1971

These look largely great @GinoGR1971 and should work well for the dividers. Are you passing these through some ML upscale algorithms? The ones I might quibble with are the Debt icons which seem to have some edge artifacts.

nickv2002 avatar May 27 '25 16:05 nickv2002

Hi NIck, no upscales.

I downloaded gold card from the dom.wiki site and cut out the coin and remove the number. search the internet for fonttype and created the various coin values from scratch

The potion and the victory shield are also cut out from the cards available on the dom.wiki site

I have a photoshop program, when i load a pdf-file, it reconize images and create layers of each image. as long it's not a scanned pdf-file

The various debt values also created from scratch. it has the same font as the coins. you won't see the artifacts when the image is getting smaller

Image

A while back i created various banners from a website where you can create various dominion cards

GinoGR1971 avatar May 27 '25 17:05 GinoGR1971

@GinoGR1971, Thanks, these look great!

Can you also generate images for:

2+ 3+ 4+ 12 13

The + versions are used on some Guilds cards, and 12 and 13 appear in some of the rules examples, even though they aren't costs of cards.

mbbush avatar Jul 09 '25 00:07 mbbush

@mbbush:

Image Image Image Image Image Image

GinoGR1971 avatar Jul 09 '25 17:07 GinoGR1971