Thema: Delphi Bitmap in SW umwandeln

Einzelnen Beitrag anzeigen

DocZenith

Registriert seit: 8. Feb 2006
27 Beiträge
 
#8

Re: Bitmap in SW umwandeln

  Alt 11. Feb 2006, 19:10
ups, beim quellcode unten hab ich noch einen fehler (abitmap heißt bitmap!)

Delphi-Quellcode:
  { Bildformat auf 1 Bit setzen, damit Speicher eingespart wird }
[b]Bitmap[/b].PixelFormat := pf1Bit;
for y := 0 to Bitmap.height - 1 do
  begin
    PixelLine := Bitmap.ScanLine[y];

    for x := 0 to Bitmap.width - 1 do
    begin
       if PixelLine^[x] = 255
       then begin
         pixelline^[x] := 1
           end
           else
         pixelline^[x] := 0;
         end;
    end;
  Mit Zitat antworten Zitat