RSS/Atom feed Twitter
Site is read-only, email is disabled

how to

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

10 of 10 messages available
Toggle history

Please log in to manage your subscriptions.

Script-Fu: Text in a transparent image Cismaru Nicolae 16 Apr 02:16
  Script-Fu: Text in a transparent image Hago Ziegler 16 Apr 10:53
   how to sam ende 16 Apr 13:28
    how to Hago Ziegler 16 Apr 15:04
     how to Malcolm Turnbull 16 Apr 16:14
     how to sam ende 16 Apr 17:41
    how to Guillermo S. Romero / Familia Romero 16 Apr 16:25
how to Tom Williams 16 Apr 16:37
  how to Guillermo S. Romero / Familia Romero 16 Apr 17:28
  how to sam ende 16 Apr 17:44
Cismaru Nicolae
2003-04-16 02:16:25 UTC (almost 21 years ago)

Script-Fu: Text in a transparent image


Hello,
My name is Nicu Cismaru and I am a new user of GIMP. I want to create a script that will generate a transparent gif with my email address. The parameters of the script should be the font and the color. I am using WinGIMP v1.2.3. I have tried to create a script based on the example Michael Terry gives in its tutorial but I got stucked. I make an image (gimp-image-new), a layer for the image (gimp-layer-new) and a layer for the text (gimp-text-fontname). I resize the image to the dimensions of the text but I do not know what I should do next as this is the first script I am working at. Thank you for your time, NicuProtect your PC - Click here for McAfee.com VirusScan Online

Hago Ziegler
2003-04-16 10:53:17 UTC (almost 21 years ago)

Script-Fu: Text in a transparent image

Hi Nicu,

I want to create a
script that will generate a transparent gif with my email address.

Below you find a script, which makes a RGB-image with transparent background. I also tried it once with Mike Terrys totorial. I tried to convert it to INDEXED, but the output is quite ugly.

Regards, Hago

......................

(define (script-fu-text-box1 inText inFont inFontSize inSpiel inTextColor) (set! theImageWidth 10)(set! theImageHeight 10) (set! theImage (car (gimp-image-new theImageWidth theImageHeight RGB) ) ) (set! theLayer (car (gimp-layer-new theImage theImageWidth theImageHeight 0 "layer1" 100 0) ) ) (gimp-image-add-layer theImage theLayer 0) (gimp-layer-add-alpha theLayer)
(gimp-palette-set-foreground inTextColor) (gimp-selection-all theImage)
(gimp-edit-clear theLayer)
(gimp-selection-none theImage)
(set! theText (car (gimp-text theImage theLayer 0 0 inText 0 TRUE inFontSize 0 "*" inFont "f" "*" "*" "*" "*" "*") ) )

(set! theImageWidth (car (gimp-drawable-width theText) ) ) (set! theImageHeight (car (gimp-drawable-height theText) ) ) ;(set! theBuffer (* theImageHeight (/ inSpiel 100) ) ) (set! theImageWidth (+ theImageWidth inSpiel inSpiel) ) (set! theImageHeight (+ theImageHeight inSpiel inSpiel) )

(gimp-layer-set-offsets theText inSpiel inSpiel)

(gimp-image-resize theImage theImageWidth theImageHeight 0 0) (gimp-layer-resize theLayer theImageWidth theImageHeight 0 0) (gimp-image-merge-visible-layers theImage 0) ;(gimp-convert-indexed theImage 0 0 255 1 1 "blah") (gimp-display-new theImage)
(cons theImage (cons theLayer (cons theText () ) ) )
)
(script-fu-register "script-fu-text-box1" _"/Xtns/Script-Fu/Text/Text Box1" "Erstellt eine einfache TextBox." ""
""
""
"RGB"
SF-VALUE "Text:" "\"Text Box\"" SF-VALUE "Font:" "\"Arial\"" SF-VALUE "FontSize:" "45" SF-VALUE "Spielraum:" "20" SF-COLOR "TextColor:" '(255 0 0) )

sam ende
2003-04-16 13:28:49 UTC (almost 21 years ago)

how to

say you've already got gimp open and then you open a picture you got sent and you tell it to open with gimp, so then it opens another instance of gimp, which is silly. how do you get pictures to open in the already mounted gimp ?

sammi

Hago Ziegler
2003-04-16 15:04:08 UTC (almost 21 years ago)

how to

sam ende wrote:

how do you get pictures to open in the already mounted gimp ?

Try File -> Open

Hago

Malcolm Turnbull
2003-04-16 16:14:05 UTC (almost 21 years ago)

how to

Hago Ziegler wrote:

sam ende wrote:

how do you get pictures to open in the already mounted gimp ?

Try File -> Open

Ho.ho... :-)

This is a problem that really bugs users(idiots) at my company, they hate this feature of win-gimp (because of the slow start up times).

Regards,

Malcolm Turnbull.

Crocus.co.uk Ltd 01344 629629
http://www.crocus.co.uk/

Guillermo S. Romero / Familia Romero
2003-04-16 16:25:37 UTC (almost 21 years ago)

how to

sam@sende.freeserve.co.uk (2003-04-16 at 1228.49 +0100):

say you've already got gimp open and then you open a picture you got sent and you tell it to open with gimp, so then it opens another instance of gimp, which is silly. how do you get pictures to open in the already mounted gimp ?

To contact an already launched gimp use gimp-remote, not gimp. Use -n param if you want to make it run a new one if none is running.

GSR

Tom Williams
2003-04-16 16:37:12 UTC (almost 21 years ago)

how to

"Guillermo S. Romero / Familia Romero" wrote:

sam@sende.freeserve.co.uk (2003-04-16 at 1228.49 +0100):

say you've already got gimp open and then you open a picture you got sent and you tell it to open with gimp, so then it opens another instance of gimp, which is silly. how do you get pictures to open in the already mounted gimp ?

To contact an already launched gimp use gimp-remote, not gimp. Use -n param if you want to make it run a new one if none is running.

GSR

I believe, on Windows, drag-and-drop works so you _should_ be able to drag an image to the toolbox and drop it and it will open in the currently running Gimp. I think I've done that before, but I just don't remember. :)

Peace...

Tom

Guillermo S. Romero / Familia Romero
2003-04-16 17:28:46 UTC (almost 21 years ago)

how to

tomdkat@attbi.com (2003-04-16 at 0737.12 -0700):

I believe, on Windows, drag-and-drop works so you _should_ be able to drag an image to the toolbox and drop it and it will open in the currently running Gimp. I think I've done that before, but I just don't remember. :)

In other OSes too, but on some cases you have GIMP opened in some other place, away. You can DnD other things to other places (layers to make new images, layers to other images...). But some people do not like DnD at all.

GSR

sam ende
2003-04-16 17:41:48 UTC (almost 21 years ago)

how to

On Wednesday 16 April 2003 14:04, Hago Ziegler wrote:

sam ende wrote:

how do you get pictures to open in the already mounted gimp ?

Try File -> Open

duh, are you not understanding, if it's attched to a mail, for instance or am i missing something ?

sammi

sam ende
2003-04-16 17:44:22 UTC (almost 21 years ago)

how to

On Wednesday 16 April 2003 15:37, Tom Williams wrote:

I believe, on Windows, drag-and-drop works so you _should_ be able to drag an image to the toolbox and drop it and it will open in the currently running Gimp. I think I've done that before, but I just don't remember. :)

i'm on debian k6.

sammi