It is currently Sat Jun 20, 2026 4:44 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Python script to open XCF and export to PNG in GIMP 3
PostPosted: Thu Aug 21, 2025 4:10 pm  (#1) 
Offline
New Member

Joined: Aug 21, 2025
Posts: 2
Hi,
I need help creating a Python command that I can use in my script. The command should open a specified .xcf file in GIMP and export it to .png.

Can someone guide me on how to do this properly in GIMP 3.0?
My system: Windows 11

Thanks!


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Python script to open XCF and export to PNG in GIMP 3
PostPosted: Thu Aug 21, 2025 5:04 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2019
Posts: 280
Location: Lake Havasu City, Arizona, USA
Hi,
You could check out Batcher. It's a Gimp 3 plug-in that opens and saves image files.

_________________
Charles


Top
 Post subject: Re: Python script to open XCF and export to PNG in GIMP 3
PostPosted: Fri Aug 22, 2025 8:36 am  (#3) 
Offline
GimpChat Member

Joined: Apr 11, 2024
Posts: 298
@Trojan: Stumbled upon this one the other day. Sounds like what you want to do:
https://github.com/CharonM72/gimp3-pyth ... /tree/main


Top
 Post subject: Re: Python script to open XCF and export to PNG in GIMP 3
PostPosted: Sat Aug 23, 2025 5:24 am  (#4) 
Offline
New Member

Joined: Aug 21, 2025
Posts: 2
Thank you for sending the solution :)
I also wanted to ask how it is possible to launch GIMP using Python on Windows, load an XCF file, and then run the scronch.py plugin?


Top
 Post subject: Re: Python script to open XCF and export to PNG in GIMP 3
PostPosted: Sun Aug 24, 2025 12:50 pm  (#5) 
Offline
GimpChat Member

Joined: Apr 11, 2024
Posts: 298
When you look here:
https://github.com/CharonM72/gimp3-pyth ... /tree/main
it tells you where to put the file:
C:\Users[yourname]\AppData\Roaming\GIMP\3.0\plug-ins\scronch

After restarting GIMP you should find it under filters at the bottom.
If it doesn't show, you probably have the GIMP 3 version that came without python.
If so ... you must update your GIMP installation.

Then you open your image .... and export it using the scronch plug-in.

That should be it.


Top
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group