It is currently Mon Jul 22, 2024 6:14 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: New Find: Mat-Layout script
PostPosted: Sun Apr 17, 2011 7:21 am  (#1) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
A search for tutorials on joining scanned images via GIMP brought me across this old, but still functional mat-layout script by James Waldby (made in 2003). I tend to look for existing tutorials to recommend to GIMP users before I set out making my own. Why re-invent the wheel, right?

http://gimpfr.org/pub/scripts-2.2/yahoo ... t2_0.2.scm

Anyway, the script works, and being like most other GIMP users, it's hard to pass a good script by.

It will stack up to 4 images into 2 rows. It works great for joining over-sized images scanned in parts (which I have to do often). You have to have the images opened in GIMP in order for them to show in the mat layout script menu.

It registers itself in the older <Toolbox>/Xtns but I changed mine to correctly register at <Image>.

There are a few additional scripts you can take a look at (warpsharp still works, too) at this same location found here (WARNING! Most of the scripts located here are broken - although it would be nice if some of the more interesting ones were updated - woodentext.scm, for example):

http://gimpfr.org/pub/scripts-2.2/


Attachments:
jmat-layout2_0.2.scm.zip [2.55 KiB]
Downloaded 158 times

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes
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: New Find: Mat-Layout script
PostPosted: Sun Apr 17, 2011 7:25 am  (#2) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
I also got shadowy.scm to work, but I'm still trying to decide which gradient options I want to keep in the script because it doesn't seem to apply the gradient blend correctly.

This ASCII script (below) seems interesting, but is broken:


; Chris Gutteridge / ECS Dept. University of Southampton, England
; "ASCII 2 Image" script for the Gimp.
;
; 8th April 1998
;
; Takes a filename of an ASCII file and converts it to a gimp image.
; Does sensible things to preserve indents (gimp-text strips them)
;
; cjg@ecs.soton.ac.uk

; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

; Define the function:

(define (script-fu-asc-2-img inFile
              inFont
              inFontSize
              inTextColor
                             inTrans
                             inBackColor
              inBufferAmount)
   
  (set! old-bg (car (gimp-palette-get-background) ) )

  (set! theImage (car (gimp-image-new 10 10 RGB) ) )
 
  (set! theLayer (car (gimp-layer-new theImage
                  10
                  10
                  RGBA_IMAGE
                  "layer 1"
                  100
                  NORMAL) ) )

  (gimp-palette-set-background inBackColor)
  (gimp-layer-set-name theLayer "Background")
  (gimp-image-add-layer theImage theLayer 0)

  (script-fu-asc-2-img-layer theImage theLayer inFile inFont inFontSize
              inTextColor inBufferAmount)
 
  (set! theBuffer (* inFontSize (/ inBufferAmount 100) ) )
  (set! theImageWidth (+ theImageWidth theBuffer theBuffer ))
  (set! theImageHeight (+ theImageHeight theBuffer theBuffer ))
 
  (gimp-image-resize theImage
           theImageWidth
           theImageHeight
           theBuffer
           theBuffer)
  (gimp-layer-resize theLayer
           theImageWidth
           theImageHeight
           theBuffer
           theBuffer)
  (gimp-selection-all theImage)
  (if (= inTrans TRUE)
      (gimp-edit-clear theLayer)
      (gimp-edit-fill theLayer BG-IMAGE-FILL)
      )
  (gimp-selection-none theImage)
 
  (gimp-palette-set-background old-bg)
  (gimp-display-new theImage)
 
  (gimp-image-clean-all theImage)
 
  (gimp-displays-flush)
  (cons theImage  ()   )
)

(define (script-fu-asc-2-img-layer inImage
               inLayer
               inFile
                    inFont
                    inFontSize
               inTextColor)
 
  (set! old-fg (car (gimp-palette-get-foreground)))
  (set! theImage inImage)
  (set! theLayer inLayer)
  (set! theFile (fopen inFile))
 
  (set! otherLayers (cadr (gimp-image-get-layers theImage)))
  (set! nLayers (car (gimp-image-get-layers theImage)))
  (set! n nLayers)
 
  (gimp-palette-set-foreground inTextColor)
  (gimp-selection-none theImage)
  (set! theData ())
  (set! theIndentList ())
  (set! theChar "X")
  (while (not (equal? () theChar))
    (set! allspaces TRUE)
    (set! theIndent 0)
    (set! theLine "")
    (while    (begin    (set! theChar (fread 1 theFile))
            (and    (not (equal? "\n" theChar))
               (not (equal? () theChar))
               )
            )
         (cond    (   (equal? theChar "\t")
               (set! theChar "        ")
               (if (= allspaces TRUE)
                   (set! theIndent (+ theIndent 8))
                   ())
               )
            (   (equal? theChar " ")
               (if (= allspaces TRUE)
                   (set! theIndent (+ theIndent 1))
                   ())
               )
            (TRUE (set! allspaces FALSE))
            )
         (set! theLine (string-append theLine theChar))
         )
    (if    (= allspaces TRUE)
      (set! theLine "")
      ()
      )
    (if    (and    (equal? () theChar)
         (equal? "" theLine)
         )
      ()
      (begin    (set! theData (cons theLine theData))
         (set! theIndentList
               (cons theIndent theIndentList))
         )
      )
    )
 
  (set! theText (car (gimp-text-fontname theImage
                -1
                0
                0
                "X"
                0
                TRUE
                inFontSize
                PIXELS
                inFont)))
  (set! theCharWidth (car (gimp-drawable-width  theText) ))
  (gimp-edit-cut theText)
 
  (set! theImageHeight 0)
  (set! theImageWidth 0)
  (cjg-add-text (reverse theData)
      (reverse theIndentList)
      inFont
      inFontSize)
  (set! n nLayers)
  (gimp-palette-set-foreground old-fg)
  (gimp-displays-flush)
  )

(define (cjg-add-text inData inIndentList inFont inFontSize)
  (if    (equal? () inData)
   ()
   (let    ((theLine (car inData)) (theIndent (car inIndentList)))
     (if    (equal? "" theLine)
      ()
      (begin
        (set! theText (car (gimp-text-fontname theImage
                      -1
                      0
                      0
                      (string-append
                       " " theLine)
                      0
                      TRUE
                      inFontSize
                      PIXELS
                      inFont)))
        (set! theLineHeight (car (gimp-drawable-height  theText) ) )
        (gimp-layer-set-offsets theText
                 (* theCharWidth theIndent)
                 (+ theImageHeight
                    (- inFontSize theLineHeight)))
        (set! theImageWidth (max
                   (+ (car (gimp-drawable-width  theText) )
                 (* theCharWidth theIndent))
                   theImageWidth ))
        (if (= (car (gimp-layer-is-floating-sel theText)) TRUE)
                      (gimp-floating-sel-anchor theText)
            ()
            )
                  (gimp-layer-set-name theText theLine)
        )
      )
     (set! theImageHeight
      (+ theImageHeight inFontSize))
     (cjg-add-text (cdr inData) (cdr inIndentList) inFont inFontSize)))
  )

; Register the function with the GIMP:

(script-fu-register
"script-fu-asc-2-img"
_"<Image>/Script-Fu/Utils/ASCII to Image..."
"Create a new image containing text from a simple text file"
"Chris Gutteridge: cjg@ecs.soton.ac.uk"
"8th April 1998"
"Chris Gutteridge / ECS @ University of Southampton, England"
""
SF-FILENAME   _"Filename"               "afile"
SF-FONT       _"Font"                   "-*-Charter-*-r-*-*-24-*-*-*-p-*-*-*"
SF-ADJUSTMENT _"Font Size (pixels)"     '(45 2 1000 1 10 0 1)
SF-COLOR      _"Text Color"             '(0 0 0)
SF-TOGGLE     _"Transparent Background" FALSE
SF-COLOR      _"Background Color"       '(255 255 255)
SF-ADJUSTMENT _"Buffer Amount (% Height of Text)" '(35 0 100 1 10 0 0)
)

(script-fu-register
"script-fu-asc-2-img-layer"
_"<Image>/Script-Fu/Utils/ASCII to Image Layer..."
"Create a new layer of text from a simple text file"
"Chris Gutteridge: cjg@ecs.soton.ac.uk"
"30th April 1998"
"Chris Gutteridge / ECS @ University of Southampton, England"
"*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Layer" 0
SF-FILENAME _"Filename"             "afile"
SF-FONT     _"Font"                 "-*-Charter-*-r-*-*-24-*-*-*-p-*-*-*"
SF-ADJUSTMENT _"Font Size (pixels)" '(45 2 1000 1 10 0 1)
SF-COLOR    _"Text Color"           '(0 0 0)
)

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: New Find: Mat-Layout script
PostPosted: Sun Apr 17, 2011 8:36 am  (#3) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
mahvin wrote:

There are a few additional scripts you can take a look at (warpsharp still works, too) at this same location found here (WARNING! Most of the scripts located here are broken - although it would be nice if some of the more interesting ones were updated - woodentext.scm, for example):

http://gimpfr.org/pub/scripts-2.2/


Maybe the full list is here http://gimpfr.org/pub/scripts-2.2/index.php?view=liste anyway i believe many of the script were already updated (for sure several may be found in a 2.6 version on FX_Foundry) other are no more needed because their functions now included natively in gimp-

But sure some of the remaining may be worth a update

PS we opened 2 topics on the same argument (mine viewtopic.php?f=9&t=1552 ) maybe we could ask to the mods to merge

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: New Find: Mat-Layout script
PostPosted: Sun Apr 17, 2011 9:46 am  (#4) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
mahvin wrote:
A search for tutorials on joining scanned images via GIMP brought me across this old, but still functional mat-layout script by James Waldby (made in 2003). I tend to look for existing tutorials to recommend to GIMP users before I set out making my own. Why re-invent the wheel, right?
Well, mahvin, I clicked your first link, changed the paths and then I saw your attachment. :hoh :gaah

The script is obviously made for photos because when I made some random shapes with transparent backgrounds the background around all of them came out black. Back to the drawing board. Put colored backgrounds in them and put borders around them then ran the script.

I can see where it would come in very handy for arranging photos. Here are my rendered shapes with backgrounds and borders. It does a very nice job.

I see some white got into my borders but I'm not going to fix it for a demo image.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: New Find: Mat-Layout script
PostPosted: Sun Apr 17, 2011 10:00 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14725
Location: USA
Scrolled text.scm works well also -
I did change the menu location a little though. ;)
Image
; The GIMP -- an image manipulation program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
;
; Scrolled text --- create an scrolling animation text
; Copyright (C) 2001 Iccii <iccii@hotmail.com>
;
; --------------------------------------------------------------------
;   - Changelog -
; version 0.1  2001/11/24 Iccii <iccii@hotmail.com>
;     - Initial relase
; version 0.1a 2001/11/26 Iccii <iccii@hotmail.com>
;     - Added Added Effects option (mblur, wind, block)
; version 0.1b 2001/12/04 Iccii <iccii@hotmail.com>
;     - Added Pingpong option
;     - Added Lens option in Added Effects
; version 0.1c 2001/12/12 Iccii <iccii@hotmail.com>
;     - Added Scroll Image option
;     - Added Blur option in Added Effects
; version 0.2 Raymond Ostertag 2004/09
;     - Ported to Gimp2
;     - Changed menu entry
; --------------------------------------------------------------------
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;


(define (script-fu-scrolled-text
         text      ; •¶Žš
         font-size   ; ƒtƒHƒ“ƒg‚Ì‘å‚«‚³
         fontname   ; ƒtƒHƒ“ƒg–¼
         text-color   ; •¶Žš‚̐F
         bg-color   ; ”wŒi‚̐F
         bg-trans?   ; ”wŒi‚𓧖¾‚É‚·‚é‚©‚Ç‚¤‚©
         padding      ; •¶ŽšŽü‚è‚Ì‹óŠÔ‚Ì‘å‚«‚³
         frame      ; ƒtƒŒ[ƒ€‚̐”
         angle      ; ƒXƒNƒ[ƒ‹•ûŒü@(0-360)
         delay      ; ƒtƒŒ[ƒ€‚̍ж’x‰„ŽžŠÔ
         effect      ; “ÁŽêŒø‰Ê‚̒ljÁ
         amount      ; Œø‰Ê‚Ì“K—p—Ê
         pingpong?   ; ‰•œŒø‰Ê‚É‚·‚é‚©‚Ç‚¤‚©
         scroll?      ; ƒXƒNƒ[ƒ‹‚·‚é‚©‚Ç‚¤‚©
   )

  (let* (
    (old-fg (car (gimp-palette-get-foreground)))
    (old-bg (car (gimp-palette-get-background)))
    (img (car (gimp-image-new 256 256 RGB)))
    (dummy (gimp-palette-set-foreground text-color))
    (text-layer (car (gimp-text-fontname img -1 0 0
                 text padding TRUE font-size PIXELS fontname)))
    (text-width  (car (gimp-drawable-width  text-layer)))
    (text-height (car (gimp-drawable-height text-layer)))
    (bg-layer (car (gimp-layer-new img text-width text-height
                                   RGBA-IMAGE "Background" 100 NORMAL-MODE)))
    (angle (cond ((= angle 0) 0)
                 ((= angle 1) 180)
                 ((= angle 2) 90)
                 ((= angle 3) 270) ))
    (radians (/ (* 2 *pi* angle) 360))
   ;; ƒtƒŒ[ƒ€ˆêƒRƒ}•ª‚Ì‚¸‚ç‚·—Ê‚ð’è‹`
    (x-shift (/ (* text-width (cos radians)) frame))
    (y-shift (/ (* text-height (sin radians)) frame))
    (threshold (- 255 (/ (+ (car bg-color) (cadr bg-color) (caddr bg-color)) 6)))
    (count 0)
   )

    (gimp-image-undo-disable img)
    (gimp-image-resize img text-width text-height 0 0)
   ;; ƒfƒtƒHƒ‹ƒg‚Å”wŒi‚Í“§–¾A”wŒi‚𓧖¾‚É‚µ‚È‚¢‚Ì‚Å‚ ‚ê‚ΐF•t‚«”wŒi‚ð’ljÁ
    (if (equal? bg-trans? FALSE)
        (begin
          (gimp-palette-set-background bg-color)
          (gimp-drawable-fill bg-layer BACKGROUND-FILL)
          (gimp-image-add-layer img bg-layer -1)
          (gimp-image-lower-layer img bg-layer)
          (set! text-layer (car (gimp-image-merge-down img text-layer
                                                       EXPAND-AS-NECESSARY)))))
   ;; ƒtƒŒ[ƒ€”‚¾‚¯ŒJ‚è•Ô‚·
    (while (< count frame)
      (let* ((apply-amount (if (equal? pingpong? TRUE)
                               (* amount (sin (* (/ count frame) *pi*)))
                               (* amount (/ count frame))))
             (copyed-layer (car (gimp-layer-copy text-layer TRUE)))
             (copyed-name (string-append text "_" (number->string count)  " "
                                         "(" (number->string delay) "ms)" " "
                                         "(replace)"                         )))
        (gimp-drawable-set-name copyed-layer copyed-name)
        (gimp-image-add-layer img copyed-layer -1)
        (if (equal? scroll? TRUE)
            (gimp-drawable-offset copyed-layer TRUE OFFSET-TRANSPARENT
                                     (* x-shift count) (* y-shift count)))
   ;; ‚¸‚炵‚½Œã‚̃Cƒ[ƒW‚ɑ΂µ‚ÄŒø‰Ê‚ð“K—p‚·‚é
        (cond ((= effect 1)
                 (plug-in-mblur 1 img copyed-layer 0 apply-amount angle))
              ((= effect 2)
                 (set! copyed-layer (car (gimp-rotate copyed-layer FALSE (- radians))))
                 (plug-in-wind 1 img copyed-layer threshold 1 apply-amount 0 0)
                 (set! copyed-layer (car (gimp-rotate copyed-layer FALSE radians))))
              ((= effect 3)
                 (plug-in-pixelize 1 img copyed-layer amount)
                 (gimp-threshold copyed-layer threshold 255)
                 (if (equal? bg-trans? TRUE)
                     (begin
                       (set! mask (car (gimp-layer-create-mask copyed-layer ADD-WHITE-MASK)))
                       (gimp-layer-add-mask copyed-layer mask)
                       (plug-in-grid 1 img mask 1 amount 0 '(0 0 0) 255
                                                1 amount 0 '(0 0 0) 255
                                                0      0 0 '(0 0 0) 255)
                       (gimp-layer-remove-mask copyed-layer MASK-APPLY))
                     (plug-in-grid 1 img copyed-layer 1 amount 0 bg-color 255
                                                   1 amount 0 bg-color 255
                                                  0      0 0 bg-color 255)))
              ((= effect 4)
                 (plug-in-applylens 1 img copyed-layer (+ (/ amount 50) 1) TRUE FALSE FALSE))
              ((= effect 5)
                 (if (not (equal? apply-amount 0))
                     (plug-in-gauss-iir2 1 img copyed-layer
                                         (* apply-amount (abs (cos angle)))
                                         (* apply-amount (abs (sin angle))))))
              ('else ()))
        (set! count (+ count 1))
      ) ; end of let*
    ) ; end of while (< count frame)
    (gimp-image-remove-layer img text-layer)
    (gimp-palette-set-foreground old-fg)
    (gimp-palette-set-background old-bg)
    (gimp-image-undo-enable img)
    (gimp-display-new img)
  )
)

   ; “o˜^‚È‚Ç
(script-fu-register
   "script-fu-scrolled-text"
   "<Image>/Filters/Animation/Scrolled Text..."
   "Create an animation (scrolled text)"
   "Iccii <iccii@hotmail.com>"
   "Iccii"
   "2001, Nov"
   ""
   SF-STRING   _"Text"         "Scroll..."
   SF-ADJUSTMENT   _"Font Size (pixels)"   '(100 2 500 1 1 0 1)

   SF-FONT      _"Font"
   ; Checking winsnap plug-in (Windows or not?)
(if (symbol-bound? 'extension-winsnap (the-environment))
   ; For Windows user
      "-*-Times New Roman-bold-r-*-*-24-*-*-*-p-*-iso8859-1"
   ; Default setting
      "-*-eras-*-r-*-*-24-*-*-*-p-*-*-*"
)

   SF-COLOR   _"Text Color"      '(0 0 0)
   SF-COLOR   _"Background Color"   '(255 255 255)
   SF-TOGGLE   _"Transparent BG"   FALSE
   SF-ADJUSTMENT   _"Padding Around Text"   '(20 0 500 1 1 0 1)
   SF-ADJUSTMENT   _"Number of Frames"   '(20 1 500 1 1 0 1)
   SF-OPTION   _"Angle"      '("Left to Right" "Right to Left"
                                             "Upside to Down" "Lower to Upper")
   SF-ADJUSTMENT   _"Delay Time (ms)"   '(100 1 1000 1 1 0 1)
   SF-OPTION   _"Added Effects"   '("None" "Mblur" "Wind" "Block" "Lens" "Blur")
   SF-ADJUSTMENT   _"Amount of Effects"   '(40 1 100 1 1 0 0)
   SF-TOGGLE   _"Ping Pong Effects"   FALSE
   SF-TOGGLE   _"Scroll Image"      TRUE
)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: New Find: Mat-Layout script
PostPosted: Sun Apr 17, 2011 10:23 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14725
Location: USA
pattern-tileable-tempest.scm works
This script takes an image and creates a swirly stormy looking tileable image.
Image

;; pattern-tileable-tempest.scm -*-scheme-*-

;;  based on "Swirl-tile" by Adrian Likins  <aklikins@eos.ncsu.edu>
;;  http://www4.ncsu.edu/eos/users/a/aklikins/pub/gimp/
;;  Swirl Tile produced a seamlessly tiling swirling effect (as a new image). 
;;  (It was never seamless, look closer)

;; Rewritten by Alan Horkan, Trinity College Dublin, Ireland.  2004. 
;; See the About information for full description. 
;; Alan Horkan claims no copyright on his modifications to this script.     
;; and would have licensed it as Public Domain, however
;; No license was specified by the original author, and we
;; cannot assume it is anything other than GPL like the rest of the Gimp. 


(define (script-fu-pattern-tempest image drawable depth azimuth elevation blur-radius whirl-amount roughness)
  (let* (
      ; get height and width of current image
      (height (car (gimp-drawable-height drawable)) )
      (width (car (gimp-drawable-width drawable)) )

        ; roughness is noise level as a percentage
        (noise-level (/ roughness 100))
        (centre-x (/ width 2))
        (centre-y (/ height 2))
    )

;    (gimp-undo-push-group-start image) ; gimp 1.2
    (gimp-image-undo-group-start image)   

    ; noisify does not work with INDEXED RGB images, convert to RGB
    (if (= INDEXED (car (gimp-image-base-type image))) (gimp-convert-rgb image) )

    ; whirl can be clockwise/anticlockwise, psuedo-randomly change whirl direction
;    (if (= 1 (rand 2)) (set! whirl-amount (* -1 whirl-amount)) )

    ; effect does not work properly if there is a selection
    (gimp-selection-none image)
   
    ; this noise gets pushed to the corners by gimp-channel-ops-offset
    (plug-in-noisify 1 image drawable  FALSE noise-level noise-level noise-level 1.0)

    ; whirl the centre
    (whirl image drawable whirl-amount)

    ; pushes the old middle to the corners, to make the image tileable
;    (gimp-channel-ops-offset drawable TRUE 0 centre-x centre-y) ; gimp 1.2
    (gimp-drawable-offset drawable TRUE 0 centre-x centre-y)

    ; whirl the new centre
    (whirl image drawable whirl-amount)

    ;; gaussian blur plug-in, requires blur radius >= 1.0.  This allows choice of No Blur.   
    (if (not (= blur-radius 0))
      (plug-in-gauss-rle 1 image drawable blur-radius TRUE TRUE)
    )

    ; warning: depth of zero cause bumpmap to fail (and crash on win32)
    (plug-in-bump-map 1 image drawable drawable azimuth elevation depth 0 0 0 0 FALSE FALSE 0)

;    (gimp-undo-push-group-end image)   
    (gimp-image-undo-group-end image)   
    (gimp-displays-flush)
  )
)


;; abstracted the whirl to avoid unnecessary repitition and allow easier modification. 
;; unfortunately must repeat whirl-pinch, cannot just multiply whirl-angle by 3
(define (whirl image drawable whirl-angle)
        (plug-in-whirl-pinch 1 image drawable whirl-angle 0.0 1.0)
        (plug-in-whirl-pinch 1 image drawable whirl-angle 0.0 1.0)
        (plug-in-whirl-pinch 1 image drawable whirl-angle 0.0 1.0)
)
; whirl could be optimized for lower values (whirl by 360 once, not whirl 120 three times)
; but worst case would remain the same so it is better to keep it simple


;; Renamed to Tempest, "Swirl (Tile)" and "Swirly" were confusingly similar
(script-fu-register "script-fu-pattern-tempest"
    _"<Image>/Filters/Render/Pattern/Tempest..." ;

    ; About Dialog, Script Description and Information. 
    "Tempest, whirls up a storm.  Swirls the whole of the current image to create a tileable pattern, that looks something like a storm system. 
The tiling good but not totally seamless, the edges are not perfect. 
To repeat the pattern use with: Filters, Map, Tile...

Indexed RGB images are automatically converted to RGB to allow this effect to work. 

SEE ALSO
Xtns, Script-Fu, Pattern, Swirl Tile.  "

    "Alan Horkan.  Adrian Likins.  " ; author(s)
    "Adrian Likins.  " ; copyright? 
    "April 2004" ; date, was "1997"
    "" ; supported image types 

    SF-IMAGE "Image" 0
    SF-DRAWABLE "Drawable" 0

    ; bugfix: depth of zero cause bumpmap to fail (and crash on win32)
    SF-ADJUSTMENT _"Depth" '(10 1 65 1 1 0 0)
    ; dict. def. Azimuth Arc of the heavens extending from the zenith to the horizon, which it cuts at right angles. 
    ; still so vague I cannot come up with an appropriate simpler synonym. 
    SF-ADJUSTMENT _"Azimuth" '(135 0 360 1 10 0 0)

    ; Elevation 0 is indistinguishable from black flood fill
    ; Elevation 5 has some rough features but is still very black
    SF-ADJUSTMENT _"Elevation" '(45 0 90 1 10 0 0)

    ; blur radius works well at about a quarter of image size
    SF-ADJUSTMENT _"Blur Radius" '(2 0 100 1 10 0 0)
    SF-ADJUSTMENT _"Whirl Amount" '(320 -360 360 1 10 0 0)

    ; changed to a slider for consistency, changed to percentages too
    SF-ADJUSTMENT _"Roughness" '(50 0 100 1 1 0 0)
)


_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: New Find: Mat-Layout script
PostPosted: Sun Apr 17, 2011 10:26 am  (#7) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Rod wrote:
Scrolled text.scm works well also
Rod, obviously the script works even with those odd characters in it, eh?

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: New Find: Mat-Layout script
PostPosted: Sun Apr 17, 2011 10:55 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14725
Location: USA
Yes it seems to.I have no idea what those are unless its another language the Notepad editor just doesn't see.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: New Find: Mat-Layout script
PostPosted: Sun Apr 17, 2011 2:21 pm  (#9) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Luckily the weird characters were no part of the code but comment to the code;
comments in the native language of the author, Japanese

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: New Find: Mat-Layout script
PostPosted: Sun Apr 17, 2011 2:37 pm  (#10) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
PhotoComix wrote:
Luckily the weird characters were no part of the code but comment to the code;
comments in the native language of the author, Japanese
Instead of Japanese, they look more like Unicode extended characters to me.

If you type a word in a text editor, press Enter then type another word, copy and paste those two words in some of gimp's scripts you get that little rectangular character that are in the script Rod put up like in this screen shot of part of a script dialog.

This was done in the SOTA Chrome text area of the script dialog. It comes out fine in the results. I think there's a similar character for spaces.
Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: New Find: Mat-Layout script
PostPosted: Sun Apr 17, 2011 2:52 pm  (#11) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
I am sure were in japonise because ICCI the script author is japanese,

since ROD (or who copied that script in the french side) has not installed support for japanise character, notepad try to find the best match in the installed character, with no much luck

If you look closely the first group seems be the translation of the terms used in the script,

anyway would be impossible recover the original characters if not from the copy of the script on some gimp japanise webside.

but again no problem before them there is always a ";" so they were all comments, not a part of the script to be parsed

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: New Find: Mat-Layout script
PostPosted: Sun Apr 17, 2011 6:47 pm  (#12) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
I found a working version of this

http://gimpfr.org/pub/scripts-2.2/diver ... n-logo.scm

updated here

http://abcdugimp.free.fr/gimp/telecharg ... ipt-fu.php (under Golden)

but it's in French (not too hard to translate via Google Translate) And there is a description page (not a tutorial, though) found here:

http://abcdugimp.free.fr/gimp/telecharg ... golden.php

That link led me to GIMP's tutorial http://www.gimp.org/tutorials/Golden_Text/ and made me laugh at the fact I just created this tutorial on my blog and it already exists! Hahahaha... too funny.

An usage example of the French script:

Image

I tried to compare the French version to the broken golden-logo version, but the language barrier sort of gets in the way of that (at least for me). I've defined the unbound variable bump-layer-non-a with a let statement and it still throws the same error. I'll keep trying...

The golden-logo.scm is basically the same as the Golden text tutorial. The French version is a bit picky about text (text has to be on an alpha channel, selected, with a transparent background in order for it to work). Both versions are French, but they are worded differently.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Diferent layout for plugin FontSlab by Skinnyhouse.

13

No new posts Custom layout of Montage filter is not reflected

3

No new posts Attachment(s) where to find ...

5

No new posts Attachment(s) WHERE TO FIND???? NEED GMIC 32 BIT

1

No new posts I can’t find Gmic in Gimp

3



* Login  



Powered by phpBB3 © phpBB Group