New to both GIMP and Python, so I apologize if I have overlooked something obvious, but I have bashed and flailed at this for too long. I can use GIMP to convert webp to gif easily enough, but I cannot figure out how to automate the process. I have tried to decipher the descriptions in the procedure browser, but I think they assume more background with Python than I have. In particular, I am trying to puzzle out "file_gif_save2".
I keep getting "wrong number of parameters" errors, no matter whether I identify each parameter individually, just list them, or duplicate ones that seem redundant. Actually, if anyone even has a resource for Python-fu that actually *explains* things, that would be a huge help. Lots of googling has turned up nothing useful.
It is currently 02 Mar 2021, 19:35
| ||||
| ||||
|
|

Python fu to convert webp to gif?

-
gibletsWithShaman
- View:
|Posts
- Topic Posts: 1/5 | Posts: 48
- Joined: 30 Jun 2019, 15:49
- Cash on hand: 126.28 GLP
- Gender: Guy
- Location: Lake Havasu City, Arizona, USA
- GIMP Version: 2.10.2
- My Github files
- x 74
- x 24
I you put your code up in a attachment, then it is possible to fix it. Also, GimpForum has some excellent coders that can help if you put up a post there.
Charles
Charles
Everyday is a new experience with GIMP.
-
tim
- View:
|Posts
- Topic Posts: 2/5 | Posts: 5301
- Joined: 26 Sep 2016, 00:16
- Cash on hand: 77,033.46 GLP
- Bank: 275,463,458.00 GLP
- Gender: Guy
- Location: Canada
- GIMP Version: 2.10.X
- Paint Blotches blog
- Play them songs blog
- Personal Blog
- x 3094
- x 1048
- Contact:
The first parameter (run-mode) isn't used so maybe you're passing in something for that parameter so it's error-ing on that param.
I tried it with the below code
and got the "Operation not supported" error as it is reported as bug here
trying file_gif_save works
You'll also need to convert you image into indexed or grayscale mode first before trying exporting as .gif.
Hope that helps
Note:
A lot of times (if not all the time) the run-mode parameter isn't used in stored-procedures, and passing in a value will give the wrong number of parameters error.
I tried it with the below code
Code: Select all
pdb.file_gif_save2(image,layer,'/home/tim/Desktop/test.gif','/home/tim/Desktop/test.gif',FALSE,FALSE,0,0,FALSE,FALSE,FALSE)
trying file_gif_save works
Code: Select all
pdb.file_gif_save(image,layer,'/home/tim/Desktop/test.gif','/home/tim/Desktop/test.gif',FALSE,FALSE,0,0)
Hope that helps
Note:
A lot of times (if not all the time) the run-mode parameter isn't used in stored-procedures, and passing in a value will give the wrong number of parameters error.
aka Tin
Wow! Thanks for the quick responses. This is very useful information- now I have to go home and see if I can make use of it. The bit about run-mode not being used as a parameter is probably causing the specific "wrong number' issue. Also good to know about the conversion thing- I did include that, but wasn't sure if it was really necessary. Since I am working with a mix of B&W and color images, can they both be indexed, or do I need to separate B&W to covert to grey-scale?
Thanks again- I really appreciate the help!
Thanks again- I really appreciate the help!
GIMP Learn rocks...
-
tim
- View:
|Posts
- Topic Posts: 2/5 | Posts: 5301
- Joined: 26 Sep 2016, 00:16
- Cash on hand: 77,033.46 GLP
- Bank: 275,463,458.00 GLP
- Gender: Guy
- Location: Canada
- GIMP Version: 2.10.X
- Paint Blotches blog
- Play them songs blog
- Personal Blog
- x 3094
- x 1048
- Contact:
When you convert image to indexed all layers get indexed mode...so just indexed should be fine.
aka Tin
| ||||
| ||||
|
-
- Similar Topics
- Replies
- Views
- Last post
-
- 16 Replies
- 109 Views
-
Last post by Blighty
28 Feb 2021, 18:26
-
-
Python occasional "Unexpected error: [Errno 9] Bad file descriptor"
by opusGlass » 06 Mar 2020, 03:08 » in GIMP Python Fu Scripts/Plug-ins - 2 Replies
- 12076 Views
-
Last post by Wallace
09 Mar 2020, 03:09
-
Who is online
Users browsing this forum: No registered users and 6 guests