Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
gimp-script-fu-hirokuma
(script-fu-register
"script-fu-hirokuma" ;func name
"hirokuma" ;menu label
"hirokuma" ;description
"hirokuma" ;author
"copyright 2019" ;copyright notice
"March 02, 2019" ;date created
"" ;image type that the script works on
SF-ADJUSTMENT "Width" '(256 1 1024 1 10 0 1)
SF-ADJUSTMENT "Height" '(256 1 1024 1 10 0 1)
)
(script-fu-menu-register "script-fu-hirokuma" "<Image>/File")
(define (script-fu-hirokuma inWidth inHeight)
(let*
(
; define our local variables
; create a new image:
(theImageWidth inWidth)
(theImageHeight inHeight)
(theImage)
(theImage
(car
(gimp-image-new
theImageWidth
theImageHeight
RGB
)
)
)
(theLayerBack
(car
(gimp-layer-new
theImage
theImageWidth
theImageHeight
RGB-IMAGE
"Background"
100
LAYER-MODE-NORMAL
)
)
)
(theLayer1
(car
(gimp-layer-new
theImage
theImageWidth
theImageHeight
RGBA-IMAGE
"layer 1"
100
LAYER-MODE-NORMAL
)
)
)
(theLayer2
(car
(gimp-layer-new
theImage
theImageWidth
theImageHeight
RGBA-IMAGE
"layer 2"
100
LAYER-MODE-NORMAL
)
)
)
(theLayer3
(car
(gimp-layer-new
theImage
theImageWidth
theImageHeight
RGBA-IMAGE
"layer 3"
100
LAYER-MODE-NORMAL
)
)
)
)
(gimp-image-add-layer theImage theLayerBack 0)
(gimp-image-add-layer theImage theLayer1 0)
(gimp-image-add-layer theImage theLayer2 0)
(gimp-image-add-layer theImage theLayer3 0)
(gimp-context-set-background '(255 255 255) )
(gimp-context-set-foreground '(0 0 0) )
(gimp-drawable-fill theLayerBack BACKGROUND-FILL)
(gimp-display-new theImage)
(list theImage theLayerBack theLayer1 theLayer2 theLayer3)
(gimp-image-set-active-layer theImage theLayer2)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment