![]() |
Scanline Problem
Hi,
Ich habe ein problem mit der Scanline Funktion des TBitmaps. Das ganze funktioniert nämlich nicht mit einem frisch erstellten Bitmap. Folgendes klappt:
Delphi-Quellcode:
wenn ich das bitmap auf eine paintbox male, habe ich einen schwarzen strich in der 5ten Zeile. Mache ich aber folgendes:
imgs[0].loadfromfile('....');
P:=imgs[0].ScanLine[5]; for i:= 0 to imgs[0].width-1 do begin P^.rgbtRed:=0; P^.rgbtBlue:=0; P^.rgbtGreen:=0; inc(P); end;
Delphi-Quellcode:
so bleibt das Bitmap komplett weiss. Was mache ich falsch?
imgs[0]:=TBitmap.Create;
imgs[0].Height:=100; imgs[0].Width:=100; P:=imgs[0].ScanLine[5]; for i:= 0 to imgs[0].width-1 do begin P^.rgbtRed:=0; P^.rgbtBlue:=0; P^.rgbtGreen:=0; inc(P); end; Vielen Dank schonmal im vorraus :) mfg Antigo |
Re: Scanline Problem
Hallo,
ist das Bitmap denn im Format 24Bit? Wenn nicht, dann setz das mal. Gruß xaromz |
Re: Scanline Problem
hast du auch...
Delphi-Quellcode:
Vor der Verwendung von Scanline geschrieben?
imgs[0].PixelFormat := pf24Bit;
|
Re: Scanline Problem
nein das hatte ich nicht. So funktionierts :)
danke :) |
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:59 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz