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:
Code:
(define (script-fu-text text size image savename)
  (gimp-context-push)
  (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...
PERFECT!!!
Thanks a lot for your help.
Now I can start to build on it.

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


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Run script on action rchav 2 806 Aug 13, 2018 14:57
Last Post: rchav
  Script Fu Errors Gimp 2.10.4 lightsaber jd3481 1 520 Aug 2, 2018 05:13
Last Post: paynekj
  Script-fu script to conversion pdf to image 4ever 12 10,894 Jul 17, 2018 16:01
Last Post: paynekj
  Problems with a bat script :( ThaUnknown_ 1 508 Mar 26, 2018 21:14
Last Post: paynekj
  Script-fu ordered file list vnicent 1 327 Mar 19, 2018 17:33
Last Post: paynekj

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS