Post Reply 

Uber N00B script problem...

May 30, 2014, 13:41
Post: #1
Uber N00B script problem...
OK I feel really stupid right now and I am tired of searching for the answer so here we go...

I need to run Gimp in batch mode (I run it from another Linux program) and what I need to do is really simple:
1- Open an image in EPS format (Encapsulated Postscript from a plot output).
2- Put a text on the image.
3- Save the image in JPEG format.

So, I was able using the Script-Fu console to open the file and save it in JPEG format, but my texting part do not work. Or the image is save without the text or I end up with a black square...

Please help me, I am starting to feel really stupid...

Here is the script I wrote so far:
(define (script-fu-text text size image savename)
  (gimp-context-set-foreground "black")
  (let* ((img (car (file-eps-load 1 image image)))
         (new_layer (car (gimp-text-fontname img -1 0 0 text 10 TRUE size PIXELS "Sans")))
         (gimp-image-add-layer img new_layer -1)
    (file-jpeg-save RUN-NONINTERACTIVE img new_layer savename savename 0.93 0 1 1 "" 0 1 0 0)
Find all posts by this user
Quote this message in a reply
May 30, 2014, 15:01
Post: #2
RE: Uber N00B script problem...
Thanks a lot for your help.
Now I can start to build on it.

Find all posts by this user
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Script Fu top menu Dutchy 1 145 Feb 7, 2019 12:23
Last Post: paynekj
  Problem with the Twain Scanner Plugin klgrube 1 181 Feb 5, 2019 09:03
Last Post: paynekj
  Run script on action rchav 2 1,399 Aug 13, 2018 14:57
Last Post: rchav
  Script Fu Errors Gimp 2.10.4 lightsaber jd3481 1 947 Aug 2, 2018 05:13
Last Post: paynekj
  Script-fu script to conversion pdf to image 4ever 12 15,146 Jul 17, 2018 16:01
Last Post: paynekj

Forum Jump:

GIMP ForumPortalArchiveContactTermsRSS