Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My first python plugin review
#4
at line 55
Code:
# blur background
blur_radius = bg_height * bg_width / 35000
pdb.plug_in_gauss(image, background, blur_radius, blur_radius, 0)

The plug_in_gauss will crash if the 'blur_radius' exceeds 500, so I would check for overflow.
Code:
# blur background
blur_radius = min(500., bg_height * bg_width / 35000)
pdb.plug_in_gauss(image, background, blur_radius, blur_radius, 0)
Reply


Messages In This Thread
My first python plugin review - by origamifreak2 - 12-28-2024, 02:59 AM
RE: My first python plugin review - by Ofnuts - 12-28-2024, 09:08 AM
RE: My first python plugin review - by Ofnuts - 12-29-2024, 09:18 AM
RE: My first python plugin review - by gasMask - 12-29-2024, 12:22 AM
RE: My first python plugin review - by Ofnuts - 12-31-2024, 09:56 PM
RE: My first python plugin review - by Ofnuts - 01-01-2025, 09:26 AM
RE: My first python plugin review - by Ofnuts - 01-06-2025, 09:03 AM
RE: My first python plugin review - by Ofnuts - Yesterday, 09:18 AM

Forum Jump: