GIMP Chat http://gimpchat.com/ |
|
TypeError: could not convert to GimpRGB (Solved) http://gimpchat.com/viewtopic.php?f=9&t=18319 |
Page 1 of 1 |
Author: | Pocholo [ Fri May 08, 2020 8:50 pm ] |
Post subject: | TypeError: could not convert to GimpRGB (Solved) |
Hi guy it's me again and I'm having trouble recognizing what I'm doing wrong in this script. ![]() I know that fencepost created a Script-fu script that I used, but his script need it for you to install a scanline pattern.I just created a "Jean (denim) seamless pattern" strictly with no 3rd party add ons. I used the GIMP "Newsprint" plugin instead of a pattern to create the fabric like lines. OK, I'm getting "TypeError: could not convert to GimpRGB", what is this old senile guy ![]() File "C:\Users\Pocholo\AppData\Roaming\GIMP\2.10\plug-ins\Create a jean texture.py", line 43, in pm_jean__seamless_texture pdb.gimp_context_set_foreground (fgColor) TypeError: could not convert to GimpRGB Code: Select all from gimpfu import * |
Author: | Pocholo [ Fri May 08, 2020 9:18 pm ] |
Post subject: | Re: TypeError: could not convert to GimpRGB |
I had on the define line (size, fgColor) and the script was giving me an error mention above. I thought those were defined. I wrote on the lines below, the size = 500 and fgColor = (51, 112, 172). Now the script is running smoothly. OK, I did't have to do this in the Heart script that I posted last night. What's the difference? Code: Select all def pm_jean__seamless_texture(size, fgColor): This is the result ![]() |
Author: | MareroQ [ Fri May 08, 2020 10:53 pm ] | ||
Post subject: | Re: TypeError: could not convert to GimpRGB | ||
Hi Pocholo. Congratulations. ![]() It works without error for me (after deleting the size = 500 entry and adding registration). It would be easier to try if all the code was included.
|
Author: | Pocholo [ Fri May 08, 2020 11:23 pm ] |
Post subject: | Re: TypeError: could not convert to GimpRGB |
Thank you MareroQ. Can you explain me how you did it? I'm puzzle! ![]() Code: Select all from gimpfu import * |
Author: | MareroQ [ Sat May 09, 2020 12:33 am ] | |||
Post subject: | Re: TypeError: could not convert to GimpRGB | |||
You changed the order of PF_SPINNER, "size", with PF_COLOR, "fgcolor" (they must appear in the order in the definition), I removed unnecessary spaces in the registration (according to the attachment), I commented on: #size = 500 #fgColor = (51, 112, 172) Do you use Notepad ++? ps. Don't forget about #!/Usr/bin/env python.
|
Author: | Pocholo [ Sat May 09, 2020 1:01 am ] |
Post subject: | Re: TypeError: could not convert to GimpRGB |
Something so simple and yet for me a newbie, so hard. Thank you my friend owe you! Be safe. By the way, yes I use noterpad++. |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |