Re: analysing a bitmap
- From: "Peter Bauer" <PeterBauer@xxxxxxxx>
- Date: Wed, 25 May 2005 16:35:48 +0200
> Then it exploded because you defined myimagemap as a 1 based array,
> not 0 based one.
i overwrite the array with:
for y:= 0 to TempBitmap.Height-1 do
begin
P:= TempBitmap.ScanLine[y];
for x:= 0 to TempBitmap.Width-1 do
begin
if (P^.rgbRed = 0) and (P^.rgbGreen = 0) and (P^.rgbBlue = 0) then
MyImageMap[X, Y]:= 1
else
MyImageMap[X, Y]:= 0;
end;
end;
so every black pixel is set as 1 in myimagemap
> You appear to be getting stuck in a loop... As your fill routine is
> self calling this eventually (i.e. a fraction of a second later) blows
> the stack limit.
>
> I think this occurs when old colour=colour, although I haven't quite
> got my head round your fill logic.
thats right, now i'm skipping this with
if OldColour=Colour then exit;
> It might be worth sticking some showmessages in your fill routine, or
> dumping coordinates to a memo1 box so you can see where it's going,
> and what it's doing.
>
> With my test image the y coordinate decreased from where I started to
> 0 then sat going 0,1,0,1,0,1 until the stack went pop.
yes, at the moment i'm to dump to handle this methode,
not easy to cut a char of a word :)
.
- Follow-Ups:
- Re: analysing a bitmap
- From: Dodgy
- Re: analysing a bitmap
- References:
- analysing a bitmap
- From: Peter Bauer
- Re: analysing a bitmap
- From: Dodgy
- analysing a bitmap
- Prev by Date: Re: analysing a bitmap
- Next by Date: Re: analysing a bitmap
- Previous by thread: Re: analysing a bitmap
- Next by thread: Re: analysing a bitmap
- Index(es):
Relevant Pages
|
|