ofnuts wrote:
Enlarge canvas (or not), insert white/black layer under image layer? Three lines of script+one shortcut....
Well I already made a script to check for transparency issues that inserts 5 colored layers in a layer group at the bottom of the stack. I could probably modify it to enlarge the canvas as well. The only problem I foresee is when dragging an image into a bigger canvas it is not always centered. Ala, more steps if I don't do it all in order.
(define (script-fu-alpha-check image drawable)
(let* (
(width (car (gimp-image-width image)))
(height (car (gimp-image-height image)))
(layer-white (car (gimp-layer-new image width height 0 "FFFFFF" 100 0)))
(layer-black (car (gimp-layer-new image width height 0 "000000" 100 0)))
(layer-grey (car (gimp-layer-new image width height 0 "5C5C5C" 100 0)))
(layer-green (car (gimp-layer-new image width height 0 "00FF00" 100 0)))
(layer-red (car (gimp-layer-new image width height 0 "FF0000" 100 0)))
(fg-old (car (gimp-context-get-foreground)))
(active-old (car (gimp-image-get-active-layer image)))
)
(gimp-image-undo-group-start image)
(define alpha-group (car (gimp-layer-group-new image)))
(gimp-item-set-name alpha-group "Alpha-Check")
(gimp-image-insert-layer image alpha-group 0 0)
(gimp-image-lower-item-to-bottom image alpha-group)
(gimp-context-set-foreground '(255 0 0))
(gimp-drawable-fill layer-red FOREGROUND-FILL)
(gimp-image-insert-layer image layer-red alpha-group -1)
(gimp-context-set-foreground '(0 255 0))
(gimp-drawable-fill layer-green FOREGROUND-FILL)
(gimp-image-insert-layer image layer-green alpha-group -1)
(gimp-context-set-foreground '(0 0 0))
(gimp-drawable-fill layer-black FOREGROUND-FILL)
(gimp-image-insert-layer image layer-black alpha-group -1)
(gimp-context-set-foreground '(255 255 255))
(gimp-drawable-fill layer-white FOREGROUND-FILL)
(gimp-image-insert-layer image layer-white alpha-group -1)
(gimp-context-set-foreground '(92 92 92))
(gimp-drawable-fill layer-grey FOREGROUND-FILL)
(gimp-image-insert-layer image layer-grey alpha-group -1)
(gimp-context-set-foreground fg-old)
(gimp-image-set-active-layer image active-old)
(gimp-image-undo-group-end image)
(gimp-displays-flush)
)
)
(script-fu-register
"script-fu-alpha-check"
"Alpha Check..."
"Create background layers of contrasting colors to check transparent artwork against"
"Akovia"
"copyright"
"01-2013"
"RGB*"
SF-IMAGE "Image" 0
SF-DRAWABLE _"Drawable" 0
)
(script-fu-menu-register "script-fu-alpha-check"
"<Image>/Filters/Fanart")
Odinbc wrote:
One more suggestion for a faster workflow, use XnView to preview your images.
1. Put all the test images in one folder.
2. In XnView, change to your preferred background colour.
3. Scan through images, when you find an image that needs adjustment, send to Gimp.
Again, more steps and another program to open, but a fine idea. I do have XnViewMP installed.
For now I've gotten used to just using the 2 shortcuts for Padding from Theme & Select Custom Color. It's only 2 extra clicks if I have a white tile already in the color selector, so it's not horrible. I'll just hope the devs might see the usefulness in being able to define Light & Dark check colors in the future. *crosses fingers*
Thank you everyone for the suggestions.