Have card images be the correct size #5

Closed
opened 2024-08-03 09:54:46 +00:00 by Erzangel · 3 comments
Owner

Specification of the need:

  • I want cards to not have ugly black bars, either vertical or horizontal

Some ideas:

  • Pre-trim the images using basic Python image manipulation to remove the parts larger than the needed image ratio? Essentially adding a preparation step before creating the cards SVG, with an intermediary image output
Specification of the need: - I want cards to not have ugly black bars, either vertical or horizontal Some ideas: - Pre-trim the images using basic Python image manipulation to remove the parts larger than the needed image ratio? Essentially adding a preparation step before creating the cards SVG, with an intermediary image output
Erzangel added the help wantedenhancement labels 2024-08-03 09:54:46 +00:00
Owner

Maybe we can tell the svg to do that automatically, like the css object-fit property https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit

Maybe we can tell the svg to do that automatically, like the css object-fit property https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
Author
Owner

image

![image](/attachments/ea329afe-690e-4508-b75d-335a865b21ed)
841 KiB
Owner
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio
Sign in to join this conversation.