Просмотр исходного кода

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
Martin Prikryl 9 лет назад
Родитель
Сommit
cc19fdf5d8
1 измененных файлов с 2 добавлено и 12 удалено
  1. 2 12
      deployment/winscpsetup.iss

+ 2 - 12
deployment/winscpsetup.iss

@@ -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;