Einzelnen Beitrag anzeigen

Benutzerbild von Evian
Evian

Registriert seit: 10. Apr 2003
Ort: Berlin
485 Beiträge
 
Delphi 6 Professional
 
#1

Bittmaps in Array of TBitmap schreiben

  Alt 1. Sep 2005, 22:07
Hallöschen,

ich versuche ein paar Bitmaps verkleinert in ein Array of Bitmap zu schreiben.

Delphi-Quellcode:
...
Type
Athumps = Array of Tbitmap;

var
  thumps : Athumps;

...

procedure TForm5.makeminimap;
VAR
a,b,i,he,wi,x,y : INTEGER;
Bild :TBitmap;
jpeg: TJpegImage;
begin
  he := 1000 DIV unit1.YLENTH;
  wi := 1000 DIV unit1.XLENTH;

  setlength(thumps,0);
  setlength(thumps,form1.ListBox2.Count);

  Bild := TBitmap.Create;
  jpeg := TJpegImage.Create;

  Bild.Width := wi; Bild.Height := he;

for i := 1 TO form1.ListBox2.Count do
BEGIN
    Jpeg.Assign(form2.getPicture(i));
    Bild.Canvas.StretchDraw(Rect(0, 0, wi, he),Jpeg);
    thumps[i] := Tbitmap.Create;
    thumps[i].Assign(Bild);
END;

END;
Aber ich bekomme immer eine Invalid - Pointer Exception...

Was mache ich Falsch?!


gruß

Evian
-> www.Phillsoft.de

Ich bin nun Mathematiker, aber meine Freundin bleibt trotzdem unberechenbar!
  Mit Zitat antworten Zitat