Tchernobill Posted May 15, 2022 Share Posted May 15, 2022 I have an algorithm that extracts data from the game engine and I wanna synthetise it as an image storing data in RGB and Alpha. I could also store it as text and use an external tool to do the text to image conversion, but this would remove some options. 1/ Snippet From internet I found https://github.com/wyozi/lua-pngencoder that seems to do the job but requires "bit" base library that seems not accessible to my mod. Anyone has any idea how to use "bit" in a pz mod ? Also I intend to produce BIG images and I'm not sure it will do the trick. If it does I am afraid of lua performances. 2/ Ingame tools 2a/ ImageUtils.saveImage This function is based on an ingame Texture type. It only seems to work for creating "png" but I am totally ok with that. One Texture constructor seems promising for use from lua: public Texture(String var1, int[] var2); How can I fill var2 with my RGBA values ? 3/ Any other idea on how to create images ingame is welcome. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now