Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

How to avoid distortion on images? #134

Open
MatthK opened this issue Jul 20, 2020 · 2 comments
Open

How to avoid distortion on images? #134

MatthK opened this issue Jul 20, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@MatthK
Copy link

MatthK commented Jul 20, 2020

I'm trying to make a slideshow that shows simple photos on a kiosk.

I have photos that are portrait oriented and have a resolution of 1080x1920 pixels. I'm using the following markup:

[container top=0% right=0% bottom=0% left=0%] [img url="https://libresign.domain.com/api/endpoint/slide/asset/slide_get_asset.php?id=cd5904f728f8122d8a20e5348b73b3a0&name=AllNatural.png&hash=60a1cae4fb4cd8b49f2a25b67e8b0f31" width=100% height=100%][/img] [/container]

When I run the slideshow on a client that has not the exact same resolution, then the image will be distorted. Is there a way to avoid that?

@eerotal
Copy link
Owner

eerotal commented Jul 22, 2020

Currently there's no way to set static sizes or aspect ratios for images. Sizes can only be specified in percents of the screen size. It would certainly be a good idea to make it possible to resize images by specifying a pixel size aswell. It'd also be nice to have a markup tag where you can set the image size as a percentage but that would still preserve the original aspect ratio of the image.

@eerotal eerotal added the enhancement New feature or request label Jul 22, 2020
@TheAssassin
Copy link

Wouldn't it be sufficient to just not require both height and width, and calculate the missing datum respecting the aspect ratio? CSS makes this really easy, actually.

Off topic: I would also suggest to set default values for other tags which are currently required. For instance, it makes no sense to require absolute percentages for all tags in container, you could just use 0% as a fallback. That would be much more intuitive.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants