mrkwnzl / cyphersystem-foundryvtt

The Cypher System for Foundry VTT
Other
21 stars 14 forks source link

Use contain rather than "scale-down" for image size #343

Closed farling42 closed 10 months ago

farling42 commented 10 months ago

To ensure that the image is large as possible within the allowed box, the CSS should set "object-fit" to "contain" rather than "scale-down".

For one particular game, I've ended up with small images (around 60x60) and it would be nice for them to be scaled up to fit the available box (whilst retaining their original aspect ratio).

mrkwnzl commented 10 months ago

That was actually intentional because scaling an image up via HTML does make the image look worse, compared to a proper upscaling with an image editor. On the other hand, scaling down is unproblematic. So I thought keeping the original size of smaller images would be best. Thoughts on the reasoning?

farling42 commented 10 months ago

I just cropped some images from a photo and loaded them into the Actor sheets a while ago.

It was only in the past few weeks Thai I noticed they'd changed to small images in the sheet instead of filling the full available box.

I was quite happy with the old up scaling for the images.

It also avoided having to do an extra step of upscaling them up manually - if I was to upscale manually, I would then have to consider what is the best bigger dimensions that might be required.

mrkwnzl commented 10 months ago

Ah, you are talking about the portrait. I thought it was just the logo. I was confused because I only consciously decided that for the logo and I didn’t change that recently. I haven’t noticed it for the portrait, which I did change recently to allow for non-square images. I’ll simply use contain for both instances, then.