It is currently Fri Apr 26, 2024 6:27 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Simple script-fu to create new RGB image
PostPosted: Fri May 19, 2017 4:25 pm  (#1) 
Offline
GimpChat Member

Joined: May 10, 2017
Posts: 7
Hey there,

I've been experimenting with both Script-Fu and Python-Fu for a while now. I think I have a simple Script-Fu which allows the user to create a new RGB image, specifying the width and height (up to 4096px), the image depth (up to 1000), and the foreground and background colors from a single GUI. It adds a single layer filled with the specified background color to the new image. The foreground and background colors are not returned to their prior states after the script has run.

The script works with Gimp 2.8.8/Windows 10. The linefeeds are terminated with CR+LF, so they may need to be converted before running on a Mac or *nix machine.

Once installed, the script is found at File > Create > New RGB image > Make new RGB image.

Please download it and give it a try; I'd like to know if it works for others. Please let me know your Gimp version, OS and OS version, and whether you had to convert the linefeeds and/or do anything else before it worked for you (or if it didn't work). Also, let me know whether the script might be of practical use to anyone or if it's just a proof-of-concept thing. Suggested improvements are also welcome if it might be useful.

Thanks,
hnd


Attachments:
script-fu-make-new-RGB-image.scm [2.26 KiB]
Downloaded 146 times
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: Simple script-fu to create new RGB image
PostPosted: Fri May 19, 2017 5:01 pm  (#2) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
OK for a first shot at scripting, but ask yourself a question: what does it do significantly better than the dialog in File>New (and its advanced options).

AFAIK there is no CR/CRLF problems with Script files.

_________________
Image


Top
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) How to create and simple Easter egg using GIMP and G'MIC

17

No new posts Create Seamless Hexagon Pattern from Image - within seconds

0

No new posts Attachment(s) Create a red heart script

16

No new posts Can a python script use gimpfu, run from terminal, and create new img?

2

No new posts script to load text file and create text layer

6



* Login  



Powered by phpBB3 © phpBB Group