Hey,
I want to write a script which will export a window as a graphic file. Now I dont know where to start. I hope that someone can give me a starting point.
I thought about using a bitmap, generate the window with a windowskin file, and draw some text on that bitmap. And after that save the bitmap to a file. But I dont know how I could make the saving.
Any help is appreciated
Generate Image file from window
● ARCHIVED · READ-ONLY
-
-
-
If you can calculate the client coordinates of the game's window (the area in which you can draw) and add the window's coords (don't forget the viewport if it exists!) to aforementioned coords, you can do this. Win32API can do this for you, search google for FindWindow ( FindWindow.call('RGSS Player', game_title_from_ini_file) ), and GetClientRect. These api calls should do what you want.
Simply use these coordinates to calculate a rect that you can crop out of Graphics.snap_to_bitmap. Once you have the cropped image, save it with Zeus' Bitmap Export script (either marshal it and load it back or save it as a png). -
Thanks that will do the trick