DiddiZ / mtg-proxies

Print high-resolution MtG proxies.
MIT License
51 stars 14 forks source link

Corner artifacts in scans - define crop style (?) #5

Open GregorKobsik opened 4 years ago

GregorKobsik commented 4 years ago

It is only possible to crop inner borders of the images.

a attribute, which defines the crop behaviour would allow to have also outer border crop.

e.g. python print.py -border_crop 5 -crop_style INNER examples/decklist.txt decklist.pdf crop only the inner border of the cards by 5px (default behaviour)

python print.py -border_crop 5 -crop_style ALL examples/decklist.txt decklist.pdf crop all borders of the cards by 5px.

DiddiZ commented 4 years ago

What would be the use case for cropping the outer border?

Assuming you specify an inner crop, you are going to cut the cards to the sme size and thus cut the outer border anyway. The larger outer border allows for a cleaner cut without accidentally keeping a littel bit of white background.

GregorKobsik commented 4 years ago

A custom color background allows to define a seamleas background in the printing, although the corners of the images still introduce artifacts which are not desireable.

image

A full crop would allow to get rid of these artifacts and introduce an extended seamless border, which can be cut at every distance depending on the printer tolerances.

Sharp corners and quadratic cards are more desirable than round corners, as they introduce less postprocessing time needed for each produced card.

GregorKobsik commented 4 years ago

another possibility would be to use an shrink operator on the whole image, to contract it by 1px or 2px from the outer edge, and hopefully removing those artifacts.

AdamBajger commented 5 months ago

I am working on a rewrite that introduces the requested features... along with some additional "intelligent" corner-filling logic. But it will take a while probably. I have created a pull request already, but it is not ready yet.