(06-24-2024, 01:13 PM)arodri Wrote: Thanks again
The result was identical.
I used Word to make the change to the script, but the situation remains.
Out of conscience I attach the altered script, for which I would like to thank you for your help in verifying it.
I may be saying a big mistake, but the new line that you said to implement, has no sequence, that is, after an "if" there is almost always a decision to be made, which doesn't seem to exist... (that would be a mistake on my part?)
Thank you very much anyway
Sorry forget the script
Sorry... the attachment is not allowed
here is the part I change:
*-*
if len(icurve) >= 4:
pdb.gimp_curves_spline( imglayer, HISTOGRAM_VALUE, len(icurve), icurve )
if image.base_type==0
if len(icurvered) >= 4:
pdb.gimp_curves_spline( imglayer, HISTOGRAM_RED, len(icurvered), icurvered )
if len(icurvegreen) >= 4:
pdb.gimp_curves_spline( imglayer, HISTOGRAM_GREEN, len(icurvegreen), icurvegreen )
if len(icurveblue) >= 4:
pdb.gimp_curves_spline( imglayer, HISTOGRAM_BLUE, len(icurveblue), icurveblue )
#_("Batch")+"/"+
newfilepathname = os.path.dirname(filepathname) + os.sep + 'CURVE_' + os.path.basename(filepathname)
pdb.gimp_file_save( img, imglayer, newfilepathname , newfilepathname )
pdb.gimp_image_delete( img )
*-*
Just notice I forget the " : " in the new line.
Changed again and the result is the same.
In Python, the code to execute is the one below the if line, indented (it's the indentation that tell what code is covered by the if), which is why you have to shift the 6 following lines to the right. Also, the line with the if should end with a :.
Code:
# Uncomment the line below to print the applied curve in format : 0,0,X1,Y1,X2,Y2,...,255,255
# print "len:", len(icurve), "::courbe :", icurve
if len(icurve) >= 4:
pdb.gimp_curves_spline( imglayer, HISTOGRAM_VALUE, len(icurve), icurve )
if image.base_type==0:
if len(icurvered) >= 4:
pdb.gimp_curves_spline( imglayer, HISTOGRAM_RED, len(icurvered), icurvered )
if len(icurvegreen) >= 4:
pdb.gimp_curves_spline( imglayer, HISTOGRAM_GREEN, len(icurvegreen), icurvegreen )
if len(icurveblue) >= 4:
pdb.gimp_curves_spline( imglayer, HISTOGRAM_BLUE, len(icurveblue), icurveblue )
#_("Batch")+"/"+
newfilepathname = os.path.dirname(filepathname) + os.sep + 'CURVE_' + os.path.basename(filepathname)
pdb.gimp_file_save( img, imglayer, newfilepathname , newfilepathname )
pdb.gimp_image_delete( img )
|
"Word" is not a proper editor to edit code. UltradEdit, Notepad++ (which is not Notepad) are proper "free" editors.