Code Comments
Programming Forum and web based access to our favorite programming groups.Hi Jamie, thanks for posting. I must apoligize for leaving out the info you mentioned. They are in fact all pf24bit, This is the type for all NASA MER JPEG archive images. It is to do with the type of telemetry transmission from Mars. For some reason my replies don't turn up, hence this new post. I am back here with good news, I have been shown 2 different ways to accomplish the task. My thanks for this knowledge to GrandmasterB, Skybuck Flying and Mattias Andersson. // 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; // My thanks to you for coming to assist me, the saying Many hands make light work is certanly true in these Delphi Forums. Cheers, Kevin
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.