開啟PSPAD檢視 金龜子.GIF
0: 47 49 46
38 39 61 GIF89a Header
Logical Screen Descriptor
6: 03 00 3 - canvas width in pixels
8: 05 00 5 - canvas height in pixels
A: F7 - GCT follows (256 colors at 3 x 8 bits/primary)
B: 00 0 - background color #0
C: 00 - default pixel aspect ratio
R G B Global Color Table
D: 00 00 00 0 0 0 - color #0 black
10: 80 00 00 128 0 0 - color #1 dark red ("maroon")
: :
85: 00 00 00 0 0 0 - color #40 black
fseek(GIF_file, 13, SEEK_SET);
開始讀取顏色 繪製到陣列
for(int x=0;x<16;x++){ y="0;y<16;y++){">Canvas->Pixels[x+move_x][y+move_y]= RGB(bitSize[0],bitSize[1],bitSize[2]);
}
}
sort 由暗到明
color1 = RGB(GIF_R[i]*0.299,GIF_G[i]*0.587,GIF_B[i]*0.114);
color2 = RGB(GIF_R[i+1]*0.299,GIF_G[i+1]*0.587,GIF_B[i+1]*0.114);
將這兩個顏色比對,用泡沫排序法慢慢排列再次繪出,就結束了!
沒有留言:
張貼留言