忍者ブログ
  • 2024.03«
  • 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
  • » 2024.05
[PR]
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

【2024/04/26 06:06 】 |
icon2png
gimpを使ってiconからpngに落とすScript-Fuを作ってみた。

icon2png

(define (convert-layer-file image filename tattoos idx)
(let*
(
(draw (car (gimp-image-get-layer-by-tattoo image (aref tattoos idx))))
(fn (string-append filename (number->string idx) ".png"))
(transparent (car (gimp-color-picker image draw 0 0 FALSE FALSE 0)))
)
(file-png-save RUN-NONINTERACTIVE
image
draw
fn
fn
0
9
0
0
0
0
0

)
(if (> idx 0)
(convert-layer-file image filename tattoos (- idx 1))
)
))
(define (icon2png filename colors)
(let*
(
(image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(tatooarr (gimp-image-get-layers image))
)
(if (> colors 0)
(gimp-convert-indexed image NO-DITHER MAKE-PALETTE colors TRUE FALSE ""))
(convert-layer-file image filename (cadr tatooarr) (- (car tatooarr) 1))
(gimp-image-delete image)
))
(icon2png "t.ico" 0)
(gimp-quit 0)



コマンド

cat icon2png | gimp -i -b -

拍手[0回]

PR
【2012/11/24 15:06 】 | gimp | 有り難いご意見(0)
<<icon2png(改) | ホーム | なんとなく覚書>>
有り難いご意見
貴重なご意見の投稿















前ページ | ホーム | 次ページ

忍者ブログ [PR]