Ys TOOLs C

chg touka color 0.1.0

・始めに
このTOOLは画像を読み込んで colorが0,0,0の場所を1,1,1に変換し
一番左上のcolorと同じ色の場所を0,0,0に変換するTOOLです
つまり手軽に透過色に変換するTOOLです

・作成の動機
画像の透過色の描き方がめんどくさくて作成してみました

・使い方
記述予定

作成:高畑ラボ(Y_repeat)

・連絡先
バグなどありましたらご報告ください
また改造後再配布時配布URLを教えていただけると嬉しいです
y.tack2010@gmail.com

  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
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
screen 0,160,250
cls 1
mes "LOAD FILE NAME"
var4load_pic_name=""
input var4load_pic_name,120,20
ID4load_pic_name=stat
button "読み込み",*l_pic_load
mes "SAVE FILE NAME"
var4save_pic_name=""
input var4save_pic_name,120,20
ID4save_pic_name=stat
button "保存",*l_pic_save
mes "win_size"
var4win_size=""
input var4win_size,120,20
ID4win_size=stat
button "変換",*l_do_chg
button "テスト",*l_do_test
screen 1,160,100
cls 2
screen 2,160,100
cls 3
stop
*l_pic_save
    gsel 1
    bmpsave var4save_pic_name
    stop
*l_pic_load
    gsel 1
    picload var4load_pic_name
    pic_x=ginfo_winx
    pic_y=ginfo_winy
    gsel 0
    var4win_size=""+pic_x+","+pic_y
    objprm ID4win_size,var4win_size
    stop
*l_do_chg
    gsel 1
    pic_x=ginfo_winx
    pic_y=ginfo_winy
 
    color 1,1,1
    repeat pic_y
        this_y=cnt
        repeat pic_x
            this_x=cnt
            pget this_x,this_y
                if ginfo_r==0{
                    if ginfo_g==0{
                        if ginfo_b==0{
                            color 1,1,1
                            pset this_x,this_y
                        }
                    }
                }
        loop
    loop
 
    color 0,0,0
    pget 0,0
    the_r=ginfo_r
    the_g=ginfo_g
    the_b=ginfo_b
    repeat pic_y
        this_y=cnt
        repeat pic_x
            this_x=cnt
            pget this_x,this_y
                if ginfo_r==the_r{
                    if ginfo_g==the_g{
                        if ginfo_b==the_b{
                            color 0,0,0
                            pset this_x,this_y
                        }
                    }
                }
        loop
    loop
    stop
*l_do_test
    gsel 1
    pic_x=ginfo_winx
    pic_y=ginfo_winy
    gsel 2
    screen 2,pic_x,pic_y
    cls 3
    gmode 2,pic_x,pic_y
    gcopy 1,0,0,pic_x,pic_y
    stop

添付ファイル: fileYs_C12 chg_touka_color wiki.zip 14件 [詳細]