Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Blur, change mode, save as
#6
Plenty of problems...
  • SyntaxError: Non-ASCII character '\xc2' in file Blur.py on line 4, but no encoding declared;: Many of your lines start with "non-breaking spaces" (0xA0, or 0xC2A0 once encoded in UTF8), so likely you are using a word processor to write your code  and it tries to "help" by putting non-breaking spaces where you put spaces. Change for a real editor (Notepad++ is free) that won't try to outguess you.
  • The last argument of your register() call is tkemmere_blur. This is supposed to be the name of a function, but this function is defined nowhere. I suggest you rename the plugin_main function to tkemmere_blur.
  • The plugin_main/tkemmere_blur function takes two arguments, an image and a layer (and this is what your real function you take as a minimum). So your register() call should declare these argument, so that Gimp can call your function with the adequate arguments. In the code you copied, the first pair of brackets in register() likely contains a PF_IMAGE and a PF_DRAWABLE line, that should also be present in your register().
  • The code I provided is going to be part of the body of your tkemmere_blur function, and the variabe image in that code is the first parameter (timg) in your function  (so you have to change of of these names)
To debug a python script, see this tutorial: Debugging python-fu scripts in Windows
Reply


Messages In This Thread
Blur, change mode, save as - by tkemmere - 11-21-2022, 09:50 AM
RE: Blur, change mode, save as - by Ofnuts - 11-21-2022, 11:12 AM
RE: Blur, change mode, save as - by tkemmere - 11-21-2022, 12:11 PM
RE: Blur, change mode, save as - by Ofnuts - 11-21-2022, 12:40 PM
RE: Blur, change mode, save as - by tkemmere - 11-21-2022, 10:47 PM
RE: Blur, change mode, save as - by Ofnuts - 11-21-2022, 11:42 PM
RE: Blur, change mode, save as - by rich2005 - 11-22-2022, 01:30 PM
RE: Blur, change mode, save as - by tkemmere - 11-22-2022, 10:49 PM
RE: Blur, change mode, save as - by tkemmere - 11-23-2022, 10:39 PM

Forum Jump: