字體:小 中 大 |
|
|
|
| 2010/12/23 22:39:00瀏覽125|回應0|推薦0 | |
| type type_bgr =record b,g,r:byte; end; var stm_1:Tmemorystream; bmp1:TBitmap; p1:^byte; p_bgr:^type_bgr; i1:integer; begin stm_1:=Tmemorystream.Create; bmp1:=TBitmap.Create; bmp1.Width:=8; bmp1.Height:=10; bmp1.PixelFormat:=pf24bit; bmp1.SaveToStream(stm_1); bmp1.SaveToFile(test.bmp); listbox1.Items.Add(format(pos=%d size=%d,[stm_1.Position,stm_1.size])); stm_1.Position:=0; p1:=stm_1.Memory; inc(p1,54); p_bgr:=@(p1^); for i1:=1 to 8*10 do begin p_bgr^.r:=$ff; p_bgr^.g:=$0; p_bgr^.b:=$0; inc(p_bgr); end; image1.Picture.Bitmap.LoadFromStream(stm_1); p1:=image1.Picture.Bitmap.ScanLine[9]; p_bgr:=@(p1^); for i1:=1 to 8*10 do begin p_bgr^.r:=$0; p_bgr^.g:=$ff; p_bgr^.b:=$0; inc(p_bgr); end; end; |
|
| ( 心情隨筆|心情日記 ) |



字體:





