English Creating BMP,PNG,JPEG image files with lua

3 replies
Goto Page
To the start Previous 1 Next To the start
Up
The Dark Shadow
User
Offline Off
Is it possible to create BMP, PNG, JPEG image files with lua, If so, How then?
31.05.20 02:21:02 pm
Up
Cure Pikachu
User
Offline Off
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.
IMG:https://i.imgur.com/uUrye71.png
IMG:https://i.imgur.com/xpsyQRX.png
31.05.20 04:08:38 pm
Up
VADemon
User
Offline Off
@user 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.
01.06.20 02:16:32 pm
Up
MikuAuahDark
User
Offline Off
file cs2d MikuAuahDark: Paint V1.0 (3) contains BMP file writer (if you were wondering user 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.
file cs2d LuaJIT for Dedicated Server (11) JIT POWER! | Know your Lua errors! | Draw stuff at Pixelize Art --xx-- server!
To the start Previous 1 Next To the start