dan200 / GIMPComicTools

A selection of GIMP plugins useful for remastering comic books.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"gimp-edit-paste-as-new-image" procedure not found

runnerpack opened this issue · comments

commented

I have the following error message popping up after a blank layer is created:

GIMP Message

Calling error for procedure 'gimp-procedural-db-proc-info':
Procedure 'gimp-edit-paste-as-new-image' not found

Tesseract OCR Message

Unexpected error: procedure not found

Running GIMP 2.8.18 and tesseract v5.0.0-alpha.20190708 under Windows 10
Please don't tell me I need to update either of those, because I'm on a work PC and that's all I can get!

Hmm.
I wrote the plugin using GIMP 2.10, but according to the docs, there's another function called "gimp_edit_paste_as_new" which does the same thing. You could try editing the python file and seeing if that works?

commented

It seemed to like that, but the new failure is

Calling error for procedure 'gimp-procedural-db-proc-info':
Procedure 'gimp-drawable-edit-fill' not found

Do you have a link to the plugin API reference handy?
EDIT: I found one

Weirdly, the only API reference I know of is the in-app one.
(Filters > Python-Fu > Console > Browse...)

If you're able to get it working with older APIs and it still behaves the way it should feel free to submit a pull request!

commented

I substituted gimp_drawable_fill and it now runs without complaint, but the resulting layer is just filled with white and there is no text that I can find. I had to pass a constant to gimp_drawable_fill because it wouldn't recognize the GIMP_BACKGROUND_FILL enum. I've tried both 1 and 2 (since I don't know how Python enums work), with the same result.
The Tesseract window vanishes too quickly to see if it's giving an error.
I'll keep working on it off and on and submit a pull request if I get it working.

If there aren't any text layers being created, it's entirely possible the OCR tool just isn't able to recognize any text in your document.
If you're able to share the image you're using, I could test it on my version.

commented

I thought that might be the case, too, but I ran the image in Tesseract manually, and, although it complains about the DPI being 0, it still works fine.
test
GIMP Tesseract Test Image.zip

I've tried this, and it works in the normal version. Putting this down to "GIMP 2.10 required"