PlayersCouncil / LotR-TCG_card_generator

nanDECK script for generating Lord of the Rings TCG cards from CSV.
6 stars 0 forks source link

White as transparent #8

Open morvael opened 4 years ago

morvael commented 4 years ago

Please use white as fully transparent color (red 255, green 255, blue 255, opacity 0) instead of black (red 0, green 0, blue 0, opacity 0). That way png converted to 24bit jpg will retain nice rounded edges.

ketura commented 3 years ago

This may or may not be feasible. The current border that is drawn is actually a rounded rectangle with an inner and outer radius, and the outer radius extends well beyond the real card edge. The current inner radius lines up well with the card templates, but the outer radius is very obviously not the same profile as the LotR-TCG card edge. This never mattered before because the edges were automatically cut to the boundary of the card, and then the existing edge template method was used to trim the corners further.

For this issue to be resolved, the card would have to start with a white background and then when drawing the border manage to avoid bleeding off the edge (else it would overwrite the white). I have tried a number of inner radius + outer radius combinations for the existing border, and while I can get an acceptable inner radius and an acceptable outer radius, I have yet to find one that does both at once.

If someone can find the right arguments to use for the ROUNDRECT command at the end of the script I'd be happy to revisit this, but until I or someone else stumbles on it this issue is dead in the water, I think.