[Part I. GIMP基礎功]

[Part II. 一種效果的誕生]
[Part III. Script-Fu的秘密]



27.4 一步一步做,讓迷彩顯現

接續前一節,繼續以圖形使用者介面來生成迷彩的圖案,只是步驟從新編號,從1號開始編號。

Step 1. 對Camo Thick Layer圖層,執行[影像] / 選擇 / 依顏色【註1】,將黑色的部分選住。
Step 2. 對Camo Thick Layer圖層,執行[影像] / 編輯 / 清除【註2】,將選取的部分清除。
Step 3. 執行[影像] / 選擇 / 相反【註3】,將選取區域反轉。



前面三步驟,對應到下列的程式碼。
57: (gimp-context-set-background inColor2)
58: (gimp-by-color-select thickLayer
59: '(0 0 0) 127 CHANNEL-OP-REPLACE TRUE FALSE 0 FALSE)
60: (gimp-edit-clear thickLayer)
61: (gimp-selection-invert theImage)


Step 4. 對Camo Thick Layer圖層,使用顏料桶填色工具,將選取區域塗上RGB植為(170,170,0)的綠黃色。

前面的步驟,對應到下列的程式碼。
62: (gimp-edit-fill thickLayer BACKGROUND-FILL)
63: (gimp-selection-none theImage)


Step 5. 對Camo Thin Layer圖層,執行[影像] / 選擇 / 依顏色【註4】,將黑色的部分選住。
Step 6. 對Camo Thick Layer圖層,執行[影像] / 編輯 / 清除【註5】,將選取的部分清除。
Step 7. 執行[影像] / 選擇 / 相反【註6】,將選取區域反轉。


前面三步驟,對應到下列的程式碼。
69: (gimp-context-set-background inColor3)
70: (gimp-by-color-select thinLayer '(0 0 0) 127 CHANNEL-OP-REPLACE TRUE FALSE 0 FALSE)
71: (gimp-edit-clear thinLayer)
72: (gimp-selection-invert theImage)


Step 8. 對Camo Thin Layer圖層,使用顏料桶填色工具,將選取區域塗上RGB植為(150,115,100)的棕色。
Step 9. 執行[影像] / 選擇 / 全部不選【註7】,釋放選取區域。


前面兩步驟,對應到下列的程式碼。
73: (gimp-edit-fill thinLayer BACKGROUND-FILL)
74: (gimp-selection-none theImage)


Step 10. 三個圖層重疊顯示,產生迷彩圖案的效果。





選單及項目名稱的英文:
【註1】[Image] / Select / By Color
【註2】[Image] / Edit / Clear
【註3】[Image] / Select / Invert
【註4】[Image] / Select / By Color
【註5】[Image] / Edit / Clear
【註6】[Image] / Select / Invert
【註7】[Image] / Select / None