wttr.in icon indicating copy to clipboard operation
wttr.in copied to clipboard

Is there a way to increase the resolution of the png version?

Open pvonmoradi opened this issue 2 years ago • 5 comments

TODO

Add support for:

  • [ ] PNG size/resolution parameter
  • [ ] SVG support

Original text

Is there a way to control the resolution and quality of the png version of the service?
curl -s "v2.wttr.in/London.png" | identify - -=>/tmp/magick-195888IlEW9jHmNkL PNG 592x602 592x602+0+0 8-bit sRGB 29.2KB 0.000u 0:00.000

I want a higher quality image. For now, I'm using convert to increase the resolution but the image loses its sharpness.

pvonmoradi avatar Feb 06 '22 10:02 pvonmoradi

have the same needs here (higher res image), my idea is that the service provides an SVG that can be rendered or what i'm currently trying to figure out, rendering HTML with html2ps and convert (imagemagick)

JacksonChen666 avatar Feb 19 '22 21:02 JacksonChen666

@pvonmoradi Good idea. Accepted. What resolution would be reasonable for you?

chubin avatar Mar 26 '22 18:03 chubin

Thanks! But this is not a problem for me anymore (I'm ok with reduced quality by increasing the size using imagemagick convert.

Anyway, if you still want to follow this, I think producing a svg and then converting it to png on-demand is a better idea? idk

pvonmoradi avatar Mar 26 '22 20:03 pvonmoradi

I think that we should support both SVG and PNG with configurable size/resolution

chubin avatar Mar 27 '22 12:03 chubin

Would love that! Maybe something like a scale factor? But without reduced quality?

For example: Using your example with the background and having the weather float there but on a 4k image? I have 4k monitors and use a 4k wallpaper now i tried your example and the weather is very tiny and upscaling destroys the beauty of my 4k monitor haha

jonas-w avatar Jun 12 '22 17:06 jonas-w