Hmm i don't seem to be getting anything

The format started as an uncompressed 24bit TGA file and then basic info passed to the new format.
I have my Texture class to load the texture from file and stores the data in a header.

the header looks like this:
Code:
  TcxtHeader = Record
    Height,Width,BPP: Cardinal;
    Format: Word;
    Data: PChar;
  end;
and i try to get a bitmap from the data:
Code:
function TcxTexture.GetBitmap: TBitmap;
var
  wScanLine, i: Integer;
begin
  Result := TBitmap.Create;
  Result.PixelFormat := pf24bit;
  Result.Width := Header.Width;
  Result.Height := Header.Height;
  wScanLine := Header.Width*(Header.BPP div 8);
  For i := 0 to Header.Height-1 Do
  Begin
    PPixelArray(Result.Scanline[i])^[0] := wScanLine;
  End;
end;
Im guessing that i have made a really stupid mistake some where here :roll:.

I am also using a TImage to view the extracted TBitmap, by assigning it to the Picture property.