Posted 13 February 2016 - 10:19 PM
I am still currently working on the actual paint program which will support this format as well as some additional improvements to the format itself but until then here is an early release so i can start getting some helpful criticism on it.
pastebin get Xk9DWpx9
paintcan images are somewhat compressed and contain text, foreground color, and background color.
unlike my other APIs because this is currently in early development for another program I am working on, If you wish to use this code in a program of your own you must ask permission first. I will more than likely grant it but I want to keep track of who is currently using it in case i make any major changes
pastebin get Xk9DWpx9
paintcan images are somewhat compressed and contain text, foreground color, and background color.
os.loadAPI("paintcan") --#used to load the API
paintcan.encode(text,foreground,background,file)
--#the first three arguments are the same as using term.blit but accept multi line strings \n, the fourth argument determines what file the image is saved in
paintcan.decode(file) --#loads image file and returns text,foreground,background
paintcan.draw(x,y,text,foreground,background)--#draws a decoded can image at the coordinates x,y
unlike my other APIs because this is currently in early development for another program I am working on, If you wish to use this code in a program of your own you must ask permission first. I will more than likely grant it but I want to keep track of who is currently using it in case i make any major changes
Edited on 13 February 2016 - 09:20 PM