PDA

Ver la Versión Completa : Problema con BitMap.Width


fmtidona
23-09-2005, 18:39:49
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