Oct-19-2020, 04:45 AM
(This post was last modified: Oct-19-2020, 06:06 AM by Gribouillis.)
Hello to all,
I wrote a little script some years ago.
it was beginning like this.
I add to use it.
And gimp library was not recognized.
As gimpfu.
I checked then
https://ibb.co/7470fNQ
pgimp 1.0.0a22
is the new gimp, may be???
It was crashing with elegance.
https://ibb.co/WpPSVy0
Then,
I have a work to do.
What ever solution you have, other program, other plug in...
Here is the program itself.
I am not a programmer, this is may be horrible to read, but the thing was working perfectly.
I wrote a little script some years ago.
it was beginning like this.
import gimp import gimpfu import os, globToday,
I add to use it.
And gimp library was not recognized.
As gimpfu.
I checked then
https://ibb.co/7470fNQ
pgimp 1.0.0a22
is the new gimp, may be???
It was crashing with elegance.
https://ibb.co/WpPSVy0
Then,
I have a work to do.
What ever solution you have, other program, other plug in...
Here is the program itself.
I am not a programmer, this is may be horrible to read, but the thing was working perfectly.
import gimp import gimpfu import os, glob brightness = 20 contrast = 20 path = "C:\\test" outdir = os.path.join(path, "output") if not os.path.exists(outdir): os.mkdir(outdir) #de -127 a 127 for jpg in glob.glob(os.path.join(path, "*.HEIC")): #HEIC img = pdb.gimp_file_load(jpg, "") disp = pdb.gimp_display_new(img) drawable = pdb.gimp_image_get_active_layer(img) pdb.gimp_brightness_contrast(drawable,brightness,contrast) jpg=jpg[:-4]+"jpg" newjpg = os.path.join(outdir, os.path.basename(jpg)) pdb.file_jpeg_save(img, img.active_layer, newjpg,".jpg", 1.0, 0.0, 0, 0, "", 2, 1, 0, 2) pdb.gimp_display_delete(disp)
Gribouillis write Oct-19-2020, 06:06 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
I fixed for you this time. Please use code tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
I fixed for you this time. Please use code tags on future posts.