Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Fonte Link

Tente utilizando a propriedade Canvas e FillRect.

Algo como:

procedure CreateBitmapSolidColor(Width,Height:Word;Color:TColor;const FileName : TFileName);
var
 bmp : TBitmap;
begin
 bmp:=TBitmap.Create;
 try
   bmp.PixelFormat:=pf24bit;
   bmp.Width:=Width;
   bmp.Height:=Height;
   bmp.Canvas.Brush.Color := Color;
   bmp.Canvas.FillRect(Rect(0,0,Height, Width));
   bmp.SaveToFile(FileName);
 finally
   bmp.Free;
 end;
end;

httphttps://stackoverflow.com/questions/5414929/how-i-create-bmp-files-bitmaps-of-a-single-color-using-delphi

Tente utilizando a propriedade Canvas e FillRect.

Algo como:

procedure CreateBitmapSolidColor(Width,Height:Word;Color:TColor;const FileName : TFileName);
var
 bmp : TBitmap;
begin
 bmp:=TBitmap.Create;
 try
   bmp.PixelFormat:=pf24bit;
   bmp.Width:=Width;
   bmp.Height:=Height;
   bmp.Canvas.Brush.Color := Color;
   bmp.Canvas.FillRect(Rect(0,0,Height, Width));
   bmp.SaveToFile(FileName);
 finally
   bmp.Free;
 end;
end;

http://stackoverflow.com/questions/5414929/how-i-create-bmp-files-bitmaps-of-a-single-color-using-delphi

Tente utilizando a propriedade Canvas e FillRect.

Algo como:

procedure CreateBitmapSolidColor(Width,Height:Word;Color:TColor;const FileName : TFileName);
var
 bmp : TBitmap;
begin
 bmp:=TBitmap.Create;
 try
   bmp.PixelFormat:=pf24bit;
   bmp.Width:=Width;
   bmp.Height:=Height;
   bmp.Canvas.Brush.Color := Color;
   bmp.Canvas.FillRect(Rect(0,0,Height, Width));
   bmp.SaveToFile(FileName);
 finally
   bmp.Free;
 end;
end;

https://stackoverflow.com/questions/5414929/how-i-create-bmp-files-bitmaps-of-a-single-color-using-delphi

added 469 characters in body
Fonte Link
Marcelo de Andrade
  • 7,4mil
  • 2
  • 33
  • 75

Tente utilizando a propriedade Canvas e FillRect.

Algo como:

procedure CreateBitmapSolidColor(Width,Height:Word;Color:TColor;const FileName : TFileName);
var
 bmp : TBitmap;
begin
 bmp:=TBitmap.Create;
 try
   bmp.PixelFormat:=pf24bit;
   bmp.Width:=Width;
   bmp.Height:=Height;
   bmp.Canvas.Brush.Color := Color;
   bmp.Canvas.FillRect(Rect(0,0,Height, Width));
   bmp.SaveToFile(FileName);
 finally
   bmp.Free;
 end;
end;

http://stackoverflow.com/questions/5414929/how-i-create-bmp-files-bitmaps-of-a-single-color-using-delphi

Tente utilizando a propriedade Canvas e FillRect.

http://stackoverflow.com/questions/5414929/how-i-create-bmp-files-bitmaps-of-a-single-color-using-delphi

Tente utilizando a propriedade Canvas e FillRect.

Algo como:

procedure CreateBitmapSolidColor(Width,Height:Word;Color:TColor;const FileName : TFileName);
var
 bmp : TBitmap;
begin
 bmp:=TBitmap.Create;
 try
   bmp.PixelFormat:=pf24bit;
   bmp.Width:=Width;
   bmp.Height:=Height;
   bmp.Canvas.Brush.Color := Color;
   bmp.Canvas.FillRect(Rect(0,0,Height, Width));
   bmp.SaveToFile(FileName);
 finally
   bmp.Free;
 end;
end;

http://stackoverflow.com/questions/5414929/how-i-create-bmp-files-bitmaps-of-a-single-color-using-delphi

Fonte Link
Marcelo de Andrade
  • 7,4mil
  • 2
  • 33
  • 75

Tente utilizando a propriedade Canvas e FillRect.

http://stackoverflow.com/questions/5414929/how-i-create-bmp-files-bitmaps-of-a-single-color-using-delphi