Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Gráficos (https://www.clubdelphi.com/foros/forumdisplay.php?f=8)
-   -   Problema con BitMap.Width (https://www.clubdelphi.com/foros/showthread.php?t=25481)

fmtidona 23-09-2005 18:39:49

Problema con BitMap.Width
 
Tengo un BMP de 640x480, cuando lo quiero recorrer utilizando SCANLINE, me falla el limite BitMap.Width -1, for y := 1 to BitMap.Height do
begin
P := BitMap.ScanLine[y];
for x := 1 to
BitMap.Width -1 do
begin
a := P[x];


el problema es que no me recorre toda imagen y solo una parte. Modificando los limites (mediante prueba y error) llegue a que la medida debe ser


for x := 1 to 1550 do

para que funcione. Esto a que se debe?

rounin 24-09-2005 13:54:09

ScanLine returns the pointer to the internal data of bitmap.
Its interpretation depends on bitmap.PixelFormat.
IMHO, your problem has clear symptoms of invalid interpretation.

What is bitmap.PixelFormat value
and how is P[] declared?

fmtidona 25-09-2005 02:34:07

P : PByteArray;


bitmap.PixelFormat ...value?
I set bitmap.Monochrome := true;

thank you


La franja horaria es GMT +2. Ahora son las 20:37:20.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi