krikienoid / flagwaver

A web app for simulating a waving flag.
https://krikienoid.github.io/flagwaver/
MIT License
367 stars 118 forks source link

Enhancement Request for Custom Backgrounds #96

Open Sparatan1 opened 7 months ago

Sparatan1 commented 7 months ago

Thank you again for adding the capability to upload a custom background behind the flag. However, I've run into the issue of finding images that properly work with the software—the images are automatically positioned, stretched/enhanced, and blurred. Is there a way you could allow the user to resize custom backgrounds? If that is unfeasible, could you please provide the preferred format for photos?

krikienoid commented 7 months ago

The background image will scale to fit the size of your browser window, and its position will always be centered within your browser window. There should be no blurring or enhancing going on, although a low-res image might appear blurry when scaled up. So the ideal size of the background image really depends on your screen size, assuming you are using the full screen.

If you can provide some examples, I might be able to give you better guidance. I'd like to avoid adding additional image formatting options, I like to keep things streamlined and don't want to go down the path of turning FlagWaver into an image editing program.

krikienoid commented 7 months ago

Just did a quick test and it turns out that at full screen, FlagWaver will try to fit the background image into a 1920x1080 rectangle. So you are right in that FlagWaver would be stretching any image that doesn't match those proportions.

One possible solution would be to just scale the image to fill the screen but while maintaining the proportions. Part of the difficulty of dealing with these images is that it needs to work with any screen size.

Sparatan1 commented 7 months ago

Understood—thanks for sharing the proportions. I'll try to scale the images. Totally understand the reluctance towards further image editing. Have a good day!