This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uses | |
bass, bassenc; | |
function ConvertWavToOgg(var Target: string; DeleteSource: Boolean): Boolean; | |
var | |
Stream: HSTREAM; | |
Encode: HENCODE; | |
Cmd, Old: string; | |
Bytes: TByteArray; | |
begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function CreateAvatar(Source: TGraphic; Mask: TPngImage): TPngImage; | |
var | |
BMPSmooth: TBitmap; | |
Av: TPngImage; | |
begin | |
BMPSmooth := SmoothStrechDraw(Source, TSize.Create(Mask.Width, Mask.Height)); | |
Result := TPngImage.CreateBlank(COLOR_RGB, 16, Mask.Width, Mask.Height); | |
Result.Canvas.Draw(0, 0, BMPSmooth); | |
with TDirect2DCanvas.Create(Result.Canvas, Rect(0, 0, Mask.Width, Mask.Height)) do | |
begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure TForm14.FormCreate(Sender: TObject); | |
var | |
Pic: TPicture; | |
PNG, FStatusMask, FOver: TPngImage; | |
function CreateAvatar(Source: TGraphic; Mask: TPngImage): TPngImage; | |
var | |
BMPSmooth: TBitmap; | |
Av: TPngImage; | |
begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure TForm14.FormCreate(Sender: TObject); | |
var | |
Pic: TPicture; | |
PNG, FStatusMask, FOver: TPngImage; | |
function CreateAvatar(Source: TGraphic; Mask: TPngImage): TPngImage; | |
var | |
BMPSmooth: TBitmap; | |
Av: TPngImage; | |
begin |
NewerOlder