Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Borland Delphi > Scanline Enigma...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3665 of 3852
Post > Topic >>

Scanline Enigma the Solutions

by "Kevin Forbes VK3KUF" <vk3ukf@[EMAIL PROTECTED] > Mar 28, 2008 at 08:43 PM

Hello Skybuck Flying,

it worked.

My replies vanish into cyberspace, hence this new post.

My thanks to you for your assistance.
I will place your code into my sample app. and leave online for others.

Here are the solutions to joining two images into one. The purpose, Stereo

images.

// After making a couple of posts to Borland forums, I have been provided 
with not one but two solutions.
//
// The first solution was provided by two folk at almost the same time, 
GrandmasterB and Skybuck Flying.
// Their suggestion was to throw away scanline and use the Draw command 
instead. It worked great.

procedure TForm1.Button25Click(Sender: TObject);
var
  W, H : integer;
begin
//
  Label5.Caption := '>>> MERGE METHOD GrandmasterB/Skybuck (ATTEMPT)';
  Button10.Click; // Process into Log File
  W := (BitmapX1.Width + BitmapX2.Width);
  H := (BitmapX1.Height);
  BitmapXOut.Width := W;
  BitmapXOut.Height := H;
//
BitmapXOut.Canvas.Draw(0, 0, BitmapX1);
BitmapXOut.Canvas.Draw(BitmapX1.Width, 0, BitmapX2);
Image3.Picture.Bitmap := BitmapXOut;
  Label5.Caption := '>>> MERGE METHOD GrandmasterB/Skybuck (SUCCESS)';
  Button10.Click; // Process into Log File
end;    //


// This was the answer to my prayers, a solution.
// A short time later Mattias Andersson provided the actual solution to
the 
Scanline problem.
// This saved my sanity, as my Scanline bug was still driving me nuts, 
because I still didn't know

why it didn't work.

procedure TForm1.Button26Click(Sender: TObject);
Var     //
  x, y, W, H : integer;
begin
//
  Label5.Caption := '>>> MERGE METHOD Mattias Andersson (ATTEMPT)';
  Button10.Click; // Process into Log File
  W := (BitmapX1.Width + BitmapX1.Width);
  H := (BitmapX1.Height);
  BitmapXOut.Width := W;
  BitmapXOut.Height := H;
  SetLength(ScanlinesOut, H);
  for y := 0 to H-1 do ScanlinesOut[y] := BitmapXOut.ScanLine[y];
  for y := 0 to H-1 do
  begin
    for x := 0 to BitmapX1.Width-1 do
    begin
      ScanlinesOut[y][x] := Scanlines1[y][x];
    end;
    for x := 0 to BitmapX2.Width-1 do
    begin
      ScanlinesOut[y][BitmapX1.Width + x] := Scanlines2[y][x];
    end;
   end;
Image3.Picture.Bitmap := BitmapXOut;
//
Label5.Caption := '>>> MERGE METHOD Mattias Andersson (SUCCESS)';
Button10.Click; // Process into Log File
end;
//

// So, I have been shown two ways to skin this cat.

// For help with Borland code, try visiting the following.

// 
http://newsgroups.borland.com/cgi-bin/dnewsweb?cmd=listall&group=borland.public.
// or
// alt.comp.lang.borland-delphi on newsgroups.


I am a happy chappy today,
thanks, Kevin.
 




 1 Posts in Topic:
Scanline Enigma the Solutions
"Kevin Forbes VK3KUF  2008-03-28 20:43:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 19:25:34 CDT 2008.