How to bring an image inside a GUI? Is this possible in BashScript or learn a new language?

I am developing my first beautiful application in Bashscript, hmm ...

So, I start with it some kind of GUI, zenity

from this first try. But I want to bring visual art without any function to the GUI and also just visual art. I want the final application to run cross-os.

How to simply show an image inside a GUI window? (Maybe with the OK button or nothing, just show the image for a while).

Any "lightweight" solution for this? In BashScript or something else? Any solution, especially in C or other languages, is also greatly appreciated ...

Thanks for your attention, you have a nice day.

I found Glade with gtk, but you still need to go deeper. Any other solution?

EDIT

I want the final application to run as cross-os.

Hey ... Pretty expensive ... I found a crazy guy like me , he wants a GUK GUI with Bashscript! I'm not the only crazy dude in the world lol ....

And I want a "simple" solution, simply because that's what I need for my program is very simple . The GUI shows an image, buttons and does. Just to clarify.

0


a source to share


2 answers


Use the command display

in ImageMagick

:

$ display img.png

      



It will display the image in the GUI window.

+2


a source


Bash is not a language for writing graphical applications. There are extensions like dialog, zenity and others that allow you to use a GUI or TUI to accept input for further bash processing, but these things are very limited. You need to choose a toolkit like GTK, QT or wxWidgets. Most high level scripting languages ​​will have bindings for all the GUI tools I've proven for examples (python, ruby, perl).



+1


a source







All Articles