mirror of
https://github.com/winscp/winscp.git
synced 2026-10-24 02:28:55 +03:00
Installer images with alpha channel
- using TAlphaBitmap from Inno Setup 5.5.7 - Commander/Explorer/Opened folder - Email from Dave Wilkinson on 09.09.2015 - Converted to .bmp using Pixelformer (http://www.qualibyte.com/pixelformer/) exporting as A8:R8:G8:B8 (32bpp) - PayPalCard - added alpha channel to background color using Pixelformer Source commit: b6e4e933ba1dc82d427f171765d7b78bdf506102
This commit is contained in:
@@ -684,26 +684,16 @@ var
|
||||
begin
|
||||
ExtractTemporaryFile(Name);
|
||||
Bitmap := TAlphaBitmap.Create();
|
||||
Bitmap.AlphaFormat := afDefined;
|
||||
FileName := ExpandConstant('{tmp}\' + Name);
|
||||
Bitmap.LoadFromFile(FileName);
|
||||
// we won't need this anymore
|
||||
DeleteFile(FileName);
|
||||
|
||||
if BackgroundColor <> 0 then
|
||||
begin
|
||||
// Solving transparency on run-time to avoid having to
|
||||
// change the background color in the image file,
|
||||
// so they can stay identical to the original
|
||||
// (except for conversion from png to bmp)
|
||||
Image.ReplaceColor := clFuchsia;
|
||||
Bitmap.Canvas.Brush.Color := Image.ReplaceColor;
|
||||
Bitmap.Canvas.FloodFill(0, 0, Bitmap.Canvas.Pixels[0, 0], fsSurface);
|
||||
Image.ReplaceWithColor := BackgroundColor;
|
||||
end;
|
||||
|
||||
Image.Bitmap := Bitmap;
|
||||
Bitmap.Free;
|
||||
Image.AutoSize := True;
|
||||
Image.BackColor := BackgroundColor;
|
||||
end;
|
||||
|
||||
function GetScalingFactor: Integer;
|
||||
|
||||
Reference in New Issue
Block a user