Menu

#3 Unable to call pdb.gimp_image_reg from python - RuntimeError: execution error

v1.0 (example)
open
None
5
2021-10-08
2021-10-04
Shane
No

HI Behnam,

I am using your new 2.0.0 version of Image Registration (thanks! By the way)

Trying to run it is a batch using PythonFu, but I encounter an error:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
RuntimeError: execution error

Manually running the plugin works without error. I have also tried different images without issue.

Running GIMP 2.10.20 (revision1)
Windows platform

Steps to reproduce
Open GIMP
Filters > Python Fu

target_filename = "C:/testing/target.JPG"
reference_filename = "C:/testing/reference.JPG"
new_image = pdb.gimp_file_load(target_filename, 'target')
ref_image = pdb.gimp_file_load(reference_filename, 'reference')
gimp.Display(new_image)
gimp.Display(ref_image)
pdb.gimp_image_reg(new_image, new_image.active_layer, ref_image.active_layer, 0, 0, 50, 6, 2, 0)

Thanks for any assistance you can provide.

Shane

Discussion

  • Behnam Tabatabai

    Hi Shane,
    Thank you for reporting the problem.
    Thank you very much also for providing the steps to reproduce the problem.
    I will need some time to analyze the problem. I will reach out back to you as soon as I have more information.
    Cheers,
    Behnam

     
  • Behnam Tabatabai

    Hi Shane,

    I have uploaded an updated version 2.0.1 of the plug-in. The problem should be resolved
    in this version.

    Cheers,
    Behnam

    PS. This is the script that I have been using for testing the non-interactive use of the plug-in:

    the_filename = "c:/TestData/sb-1.jpg"
    ref_filename = "c:/TestData/sb-2.jpg"
    
    the_image = pdb.gimp_file_load(the_filename, 'target')
    the_layer = the_image.active_layer
    pdb.gimp_item_set_name(the_layer, 'sb-1.jpg')
    
    ref_layer = pdb.gimp_file_load_layer(the_image, ref_filename)
    pdb.gimp_image_insert_layer(the_image, ref_layer, None, 1)
    pdb.gimp_image_set_active_layer(the_image, the_layer)
    
    gimp.Display(the_image)
    
    pdb.gimp_image_reg(the_image, the_layer, ref_layer, 0, 0, 1024, 6, 2, 0)
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.