merangkum tulisan ini dan ini. Akhirnya fungsi umum pengakses bitmap tanpa mengangkat ke memori dijadikan satu kelas saja. fungsi utamanya adalah pengaksesan (baca-tulis) file bitmap yang dilakukan langsung pada file ybs.
TExternalBitmap = class
protected
hdr : TBMPHeader;
pal : array of TBMPPaletteEntry;
stride : integer;
fscanline : array of dword;
fs : TFileStream;
BPP : word;
function getScan(idx : integer): dword;
procedure LoadFromFile(filename : string);
procedure Close;
public
constructor Create(filename : string);overload;
destructor Free;
property header : TBMPHeader read hdr;
property scanline[idx : integer]: dword read getScan;
property BytePerPixel : word read BPP;
function read_scanline(idx : integer):TPByteArray;
procedure store_scanline(idx : integer; buf : TPByteArray);
function get_scansize: integer;
function isActive : boolean;
procedure PutPixel(x, y : integer; color : dword);
function GetPixel(x, y : integer):dword;
end;
implementasi algoritma yang baru dilakukan antara lain modifikasi dari ini agar operasinya dilakukan di dalam file.
![]()
Filed under: computer graphics, delphi, image processing, programming, work | 1 Comment
Tags: bitmap, boundary-tracing

waahhh.. masih maen2 ama bahasa pascal toh