Rakesh Sankar
Rakesh Sankar

Reputation: 9415

How to create a transparent image with text using GIMP from command line interface

Yes, I want to use GIMP to create a transparent image with some text on my Ubuntu box. Please help.

Upvotes: 2

Views: 1646

Answers (1)

jsbueno
jsbueno

Reputation: 110311

You can call GIMP from the command line with a single "script-fu" expression, using the -b switch (for "batch").

Creating an image with some text in GIMP is a multi-step process, you will have to:

  1. create an image
  2. create the text layer
  3. add the text layer to the image
  4. adjust image size to the layer size
  5. save the image

Each of these steps is a call to GIMP's PDB API, as can be browsed by going to Help->Procedure Browser

There are "logo" scripts that automate steps 1-4, and add some (sometimes) nice effects, as the script-fu-basic1-logo procedure - but it won't save the image to file in the same step.

Threfore, you have to write a small scheme - or Python - script to perform all the steps you want to, and invoke GIMP on the command line calling this script of yours.

Upvotes: 1

Related Questions