Barnack Posted April 29, 2019 Share Posted April 29, 2019 (edited) Would it be possible to allow for command line usage of paint.net? It would let people automatize some kind of works through .bat scripts. An idea would be taking actions in order as arguments. The program called with files would still open it with said files, using command line tools would become more like a script, with actions as they appear in the menus. paint.net -cl < means paint.net will receive actions through command line with no need to open any window. open([file]) < list of files (or special characters) to be opened and apply all next actions to all opened files. It is required to have any file to perform actions on. open(*.jpg) < opens all jpg in current directory adjustments/black_and_white() < turns all images in black/white image/canvas_size(50%, top_left) < changes canvas size percentage image/canvas_size(50px, 60px, 30px/cm, top_right) < change canvas size by pixels with given resolution. If resolution is unspecified it will not be changed. image/canvas_size(30px/in, 10in, 5in, left) < change canvas size by in or cm with given resolution. If resolution is unspecified it will not be changed. help() < show help for specified command help(image) < shows list of options under image dropdown help(image/canvas_size) < shows the 3 possible sets of arguments i wrote before save_as([file]) < saves the file. If save_as is not specified, all opened files will be overwritten with the modifications applied. EXAMPLES: converting all jpg to png in a folder paint.net -cl open(*.jpg) save_as(*.png) turning all jpg files to brighter ones with 30*30px size paint.net -cl open(*.jpg) adjustments/brightness_contrast(65, 0) image/resize(best_quality, 30px, 30px) The syntax is just from my personal taste, anything else would do as long as it works and is readable Another option would be embedding a lua interpreter (although i HATE lua but nevermind) and make all the functions that are called through gui buttons available in script. It would take next to no time to add this to the gui mode (just script > call script, chose a .lua file, run it), and i think it wouldn't take long to add it as a command line argument either paint.net -script "myscript.lua" Edited April 29, 2019 by Barnack Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.