frang75 / nappgui_src

SDK for building cross-platform desktop apps in ANSI-C
https://www.nappgui.com
MIT License
442 stars 43 forks source link

Image support enhancements #121

Open SamSandq opened 1 month ago

SamSandq commented 1 month ago

I propose that the following be added to NAppGUI, as they are supported on all platforms and useful:

xbowzone commented 1 month ago

is there a way to implement lanczos and spline36 scaling/resizing for images?

frang75 commented 1 month ago

Hi @xbowzone Still no. image_scale() use drawing contexts to change the image dimensions. At the moment, the unique way to ensure a method is obtain the pixel buffer with image_pixels and use a third party library.

xbowzone commented 1 month ago

Thanks @frang75 I'll take a look into it and try to find some third party lib with good docs. Also how to integrate for eg: mpv into nappgui to play videos. Apologies for being off topic here.

SamSandq commented 1 month ago

This is a very interesting topic… I found this https://en.wikipedia.org/wiki/Comparison_gallery_of_image_scaling_algorithms

and it provides a good overview of what’s available.

frang75 commented 1 month ago

Thanks @frang75 I'll take a look into it and try to find some third party lib with good docs. Also how to integrate for eg: mpv into nappgui to play videos. Apologies for being off topic here.

NAppGUI doesn't support video, but its an interesting topic. Please, open an issue.