CS2D
Scripts Creating BMP,PNG,JPEG image files with lua Creating BMP,PNG,JPEG image files with lua
3 replies Is it possible to create BMP, PNG, JPEG image files with lua, If so, How then? Technically possible, but practically very difficult to accomplish. Main reason being you have write the file byte by byte and also know in depth the specifications for those image formats.
Like, this is a thing but converting it into CS2D-compatible Lua code is still a challenge. @ Cure Pikachu's library will work, you just need to load the bit-library (or find a replacement). Not too hard.
I was finishing a bitmap writer in pure Lua for another side project, but it was only 90% finished. I was surprised how little good information I could find on a such popular format as .bmp. MikuAuahDark: Paint V1.0 (3) contains BMP file writer (if you were wondering VADemon). However, if you have plan to transmit the generated image later to clients, then don't bother. serverinfo.lst is read on server startup only. You can modify it at runtime but changes to it only take effect on server restart.