Einzelnen Beitrag anzeigen

WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

[GR32] How to blend two TBitmap32s

  Alt 19. Sep 2010, 15:45
I don't know how to blend two bitmaps if these bitmaps are not layers. For layers I'm using OnPixelCombine with assigned procedures like this:

procedure Multiply(F: TColor32; var B: TColor32; M: TColor32);

I tried this:
Delphi-Quellcode:
function ColorAlgebra(F, B, M: TColor32): TColor32;
begin
  BlendMode.Multiply(F, B, M); // the same procedure for OnPixelCombine
  Result := BlendRegEx(F, B, M);
end;

BlendTransfer(Blended, 0, 0, Blended.BoundsRect, ImageMap, ImageMap.BoundsRect,
  ShapeMap, ShapeMap.BoundsRect, ColorAlgebra, 200
);
but MasterAlpha parasm work diffrent than master alpha in top layer (opacity). This param decide which bitmap should be more visible (0 = first, 255 = second). How to blend bitmaps like layers?
  Mit Zitat antworten Zitat