> On Jan 20, 2017, at 7:20 AM, Graeme Geldenhuys
> <[email protected]> wrote:
>
> It is slightly confusing. If you are using an Indexed image, then use
> the Pixels[] property. If you are not using an Indexed image, then use
> the Colors[] property.
Thanks guys,
Here’s the new program based on your example but it still just outputs a pure
black image.
procedure Draw;
var
image: TFPCustomImage;
canvas: TFPImageCanvas;
writer: TFPWriterPNG;
x, y: integer;
begin
image := TFPCompactImgRGB8Bit.Create(100, 100);
image.UsePalette := False;
for x := 0 to image.Width-1 do
for y := 0 to image.Height-1 do
image.Colors[x, y] := FPColor(255, 0, 0, 255);
writer := TFPWriterPNG.Create;
writer.Indexed := False;
image.SaveToFile('bitmap.png', writer);
end;
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal