Loading png overlay with command line
-
Hello,
I need to add a custom png in front of a port game launched with my own script with xinit. I need to to the same job as Retroach's overlays but I don't find the command or the program used.
It should be easy to load a png into a system that does it everywhere, but I'm stuck.
-
I'm not aware of any general method of overlaying an image on-top of a runing program, but you can set the background using feh and have the port's window fit in the middle.
-
@mitu Thanks but I really need to add png over to hide some undesired window elements. And it will be useful later for me to do some OSD on anothers projects.
-
So nobody can tell me how to load png overlay with something already present in Retropie ? I would like to avoid adding another third-party program unnecessarily. Even that is hard to find.
It drives me crazy, there are PNG loads absolutely everywhere with OSD displaying png or animations everywhere like widgets. I looked in the Retroarch source code but I didn't find anything in what I can understand.
I don't find anything on the web. How did devs have learned to display PNG ?
-
@Nash i found this Reddit post https://www.reddit.com/r/linux_programming/s/AUs0i0Hhis
In in it they suggest using pngview (https://github.com/AndrewFromMelbourne/raspidmx/tree/master/pngview), or suggests that also you can write directly to
/dev/fb0
(https://seenaburns.com/2018/04/04/writing-to-the-framebuffer/) -
@sleve_mcdichael It looks like very hard consisting to draw every pixel in a framebuffer. It should be existing something at easier level like "function load" '/home/pi/img/png.png' at "coord x" and "coord y" usable in a script.
For instance EmulationStation themes are looking for load border.png, or pop games videos in front of everthing. I doubt the dev must code "draw each pixel in framebuffer" everytime. They call certainly existing commands avaiable in the OS environement.
I will try pngview.
-
Ok, pngview was already installed on my system and used by the PiBoy OSD. I found a png loading used in the installscript of the firmware and I can reproduce this when I want with a single line added in my scripts. It's exactly what I was looking for !
@sleve_mcdichael Thanks for your help
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.