It'll re-create the initial 'standard' settings once more - as though it were a 'first run' - and you'll be back to normal again. Update I followed this answer on S.O.In all honesty, unless you've got any special custom tool presets set up that you wish to keep, the quickest - and simplest - way for you to get back to normal would be to go into your home directory, enable 'Show hidden files', then delete the '.gimp-whatever' config directory and restart GIMP. Note that you can simply copy the snippet above, paste in an editor suitable for programming (lacking one, Windows' notepad will do for it) - adjust your parameters (directory and file names), and paste the script directly on GIMP's Python console) (and each time you type next(seq)(followed by ) gimp will save the currently open image, dispose of it, open and pre-process the next one and pause at the point you have to manually fiddle with it) (note that up arrow brings the next(seq) text back) Pdb.gimp_image_merge_visible_layers(img, CLIP_TO_IMAGE) # palce calls to draw on the image before your interation here Since you want to perform automated tasks, interact with the image, them save and proceed to the next one - due to a technical problem in GIMP's console (the "input" python function does not work - to pause until you press enter), I suggest the following hack - still working on the example above: import glob.globįor filename in glob(source_folder + "/*.png"): To display the open image, call d = pdb.gimp_display_new(img) (and pair it witha a call to pdb.gimp_display_delete(d) call before calling gimp_image_delete. To automate more steps, justa dd the apropriate calls before the "save" call. Pdb.gimp_image_delete(img) # drops the image from gimp memoryĪnd that is it. Pdb.gimp_file_save(img, img.layers, dest_folder + filename, dest_folder + filename) Pdb.gimp_drawable_brightness_contrast(img.layers, 0.2, 0) Img = pdb.gimp_file_load(source_folder + filename, source_folder + filename) Source_folder = "c:/mysource_image_folder/" #type your folder inside the quotes - append the final "/"įor filename in glob.glob(source_folder + "/*.png"): (the # indicate comments, no need to type what follows them) import glob Just type the lines bellow, following the indentation, and hit enter twice at the end (for Python to know you want to exit the for loop): Now, let's suppose you want to brighten up 550 (or thousands of) ".png" images lying on the same directory, and save them on a second directory - you leverage on the Python language power to deal with file names and strings, and these GIMP PDB calls: the indexing picks the topmost layer, will take the second, and so on.) ( img.layers is a Python sequence containing all top-level layers. To get access to an open (the rightmost) GIMP image from the Python console, type: img = gimp.image_list()įrom there on, the name "img" is a reference to the image, and can be passed to calls - for example, to brithgten up the topmost layer, you can type (or click on browse, search for "bright", choose the apropriate function, click "apply" and edit the line until it reads:) pdb.gimp_drawable_brightness_contrast(img.layers, 0.2, 0) Some of these calls are simple to make - others will require a bit trial and error on your part so that you get it going. (Just hit the "apply" button to have it type-in the function call on the console for you). And the second key is to press the "browse" button on the lower part of GIMP console dialog - that will allow you to search among the hundreds of available calls to fiddle with images open in GIMP. The key to get this to become productive for you (and at >500 images I believe it will certainly be worth your time) if to get minimally famiarized with the basics of Python - if you don't know nothing about coding - you can follow the tutorial from (it will work straight from the GIMP Python console) - until you grasp "variables", "for loops" and "functions" - no need to go much further. Writing Python plug-ins can be easier than it sounds - you use the interactive mode to figure out the GIMP calls you will need for your image, and wrap those with 4 lines of boiler plate code you can copy, paste and adapt from any existing plug-insĪnd even over stackoverflow yoiu can find minimalist examples of plug-ins that just work. If you check Filters->Python->Console you will get an interactive Python console, from which you can interact with GIMP - and if you want a solution that will add new functions (perhaps just composing some existing operations) to the menus, you will have to write a plug-in. As put in the comment, this is a workload that will require scripting GIMP -Īlthough it can be done in a more or less interactive way (as individual images need separate treatment, that may actually be needed).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |