Could there be a difference between the Image form control and the TBitmap object? I am doing roughly what you did in your test but doing it "behind the scenes" with a TBitmap object. Or there is a flaw in my logic that I can't seem to see.
Here is the code in case someone can see what I am doing wrong.
Procedure SaveFinalImage (ImageFileName : String);
Var
x, y : Integer;
PixelCalc : TThisPixel;
Begin
For y := 0 To ArrayMax_y Do
Begin
For x := 0 To ArrayMax_x Do
Begin
With WorkBitmap.Canvas, PixelWorkArray[x, y] Do
Begin
If ImageCount > 0 Then
Begin
//PixelCalc.RedVal := Round (PixelWorkArray[x, y].RedVal / ImageCount);
//PixelCalc.GreenVal := Round (PixelWorkArray[x, y].GreenVal / ImageCount);
//PixelCalc.BlueVal := Round (PixelWorkArray[x, y].BlueVal / ImageCount);
PixelCalc.RedVal := Round (RedVal / ImageCount);
PixelCalc.GreenVal := Round (GreenVal / ImageCount);
PixelCalc.BlueVal := Round (BlueVal / ImageCount);
Pixels[x, y] := RGBToColor (PixelCalc.RedVal,
PixelCalc.GreenVal,
PixelCalc.BlueVal);
//Pixels[x, y] := ClRed;
End
Else
Begin
Pixels[x, y] := clBlack;
End;//If-Else
End;//With
End;//For
End;//For
WorkBitmap.SaveToFile(ImageFileName);
End;