概要

  • アクティブなレイヤーのアルファチャンネルに対して二重にアウトラインを付加する。
  • アルファチャンネルはフォアグラウンドカラーで、縁取りはバックグラウンドカラーで描かれる。
  • 作成される画像は新規レイヤー「Double Outline」に配置される。
  • スクリプトは、「フィルタ - ロゴ効果 - Double Outline」(Filters - Alpha to Logo - Double Outline)から起動する。
  • 縁取りの幅はスライダで指定可能。(1~50)

適用サンプル

  1. 適用前
    DO_Before.png

  2. 縁取りの幅を指定
    DO_Dialog.png

  3. 適用後
    DO_After.png

ソース

double-outline.scm

  • filedouble-outline.zip
    すべてを展開すべてを収束
      1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
     63
     64
     65
     66
     67
    
     
     
    -
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    !
    -
    !
     
    -
    |
    -
    -
    |
    |
    |
    |
    !
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    !
    !
    
    ; 二重アウトラインを追加
     
    (script-fu-register
        "script-fu-double-outline"        ;func name
        "Double Outline"            ;menu label
        "Add double outline with foreground/background color"
                            ;description
        "TakeAsh"                ;author
        "copyright 2013, TakeAsh"        ;copyright notice
        "2013-02-08"                ;date created
        "RGBA"                    ;image type that the script works on
        SF-IMAGE    "Image"        0
        SF-DRAWABLE    "Drawable"    0
        SF-ADJUSTMENT    "Width(inner)"    '(10 1 50 1 10 1 0)
        SF-ADJUSTMENT    "Width(middle)"    '(6 1 50 1 10 1 0)
        SF-ADJUSTMENT    "Width(outer)"    '(11 1 50 1 10 1 0)
    )
    (script-fu-menu-register
        "script-fu-double-outline"    "<Image>/Filters/Alpha to Logo")
     
    (define 
        (script-fu-double-outline inImage inBaseLayer inWidth1 inWidth2 inWidth3)
        (let*
            (
                (theImageWidth (car (gimp-drawable-width inBaseLayer)))
                (theImageHeight (car (gimp-drawable-height inBaseLayer)))
                (theOutline0 (car (gimp-layer-copy inBaseLayer TRUE)))
                (theOutline1 0)
            )
     
            (gimp-image-undo-group-start inImage)
            (gimp-context-push)
            (gimp-selection-none inImage)
     
            (script-fu-util-image-add-layers inImage theOutline0)
            (gimp-image-lower-layer inImage inBaseLayer)
            (gimp-layer-set-lock-alpha theOutline0 TRUE)
            (gimp-edit-fill theOutline0 FOREGROUND-FILL)
            (gimp-layer-set-lock-alpha theOutline0 FALSE)
     
            (set! theOutline1 (car (gimp-layer-copy theOutline0 TRUE)))
            (script-fu-util-image-add-layers inImage theOutline1)
            (gimp-selection-layer-alpha theOutline1)
            (gimp-selection-grow inImage inWidth1)
            (gimp-edit-fill theOutline1 BACKGROUND-FILL)
            (set! theOutline0 (car (gimp-image-merge-down inImage theOutline0 1)))
     
            (set! theOutline1 (car (gimp-layer-copy theOutline0 TRUE)))
            (script-fu-util-image-add-layers inImage theOutline1)
            (gimp-selection-grow inImage inWidth2)
            (gimp-edit-fill theOutline1 FOREGROUND-FILL)
            (set! theOutline0 (car (gimp-image-merge-down inImage theOutline0 1)))
     
            (set! theOutline1 (car (gimp-layer-copy theOutline0 TRUE)))
            (script-fu-util-image-add-layers inImage theOutline1)
            (gimp-selection-grow inImage inWidth3)
            (gimp-edit-fill theOutline1 BACKGROUND-FILL)
            (set! theOutline0 (car (gimp-image-merge-down inImage theOutline0 1)))
     
            (gimp-layer-set-name theOutline0 "Double Outline")
     
            (gimp-selection-none inImage)
            (gimp-context-pop)
            (gimp-image-undo-group-end inImage)
            (gimp-displays-flush)
        )
    )

outline.scm

  • fileoutline.zip
    すべてを展開すべてを収束
      1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
    
     
     
    -
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    !
    -
    !
     
    -
    |
    -
    -
    |
    |
    |
    !
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    -
    |
    |
    !
    |
    |
    |
    |
    |
    !
    !
    
    ; アウトラインを追加
     
    (script-fu-register
      "script-fu-outline"                 ;func name
      "Outline"                           ;menu label
      "Add outline with foreground color" ;description
      "TakeAsh"                           ;author
      "copyright 2017, TakeAsh"           ;copyright notice
      "2017-01-12"                        ;date created
      "RGBA"                              ;image type that the script works on
      SF-IMAGE "Image" 0
      SF-DRAWABLE "Drawable" 0
      SF-ADJUSTMENT "Width" '(1 1 50 1 10 0 SF-SPINNER)
    )
    (script-fu-menu-register
      "script-fu-outline"    "<Image>/Filters/Alpha to Logo")
     
    (define 
      (script-fu-outline inImage inBaseLayer inWidth)
      (let*
        (
          (theImageWidth (car (gimp-drawable-width inBaseLayer)))
          (theImageHeight (car (gimp-drawable-height inBaseLayer)))
          (theOutline (car (gimp-layer-copy inBaseLayer TRUE)))
        )
     
        (gimp-image-undo-group-start inImage)
        (gimp-context-push)
        (gimp-selection-none inImage)
     
        (script-fu-util-image-add-layers inImage theOutline)
        (gimp-selection-layer-alpha theOutline)
        (gimp-selection-grow inImage inWidth)
        (gimp-edit-fill theOutline FOREGROUND-FILL)
     
        (gimp-layer-set-name
          theOutline
          (string-append (car (gimp-layer-get-name inBaseLayer)) " Outline")
        )
     
        (gimp-selection-none inImage)
        (gimp-context-pop)
        (gimp-image-undo-group-end inImage)
        (gimp-displays-flush)
      )
    )

添付ファイル: fileoutline.zip 101件 [詳細] fileDO_Dialog.png 327件 [詳細] fileDO_After.png 346件 [詳細] fileDO_Before.png 346件 [詳細] filedouble-outline.zip 235件 [詳細]

リロード   新規 下位ページ作成 編集 凍結 差分 添付 コピー 名前変更   ホーム 一覧 検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS
Last-modified: Thu, 12 Jan 2017 23:47:58 JST (556d)