Start to finish was maybe 8 hours over 3 days. I have a few things that might allow me some time later this week to take a look at 3x and 4x. Since they build on one another I'll start at 3x when I get some time.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
if CreateBitmapFromRawImage(RawImage, ImgHandle, ImgMaskHandle, False) then
if RawImage_CreateBitmaps(RawImage, ImgHandle, ImgMaskHandle, false) then
if GetBitmapRawImageDescription(Bitmap.Handle, @RawImage.Description) then
if RawImage_DescriptionFromBitmap(Bitmap.Handle, RawImage.Description) then
if GetRawImageFromBitmap(Bitmap.Handle, 0, Classes.Rect(0, 0, Data.Width, Data.Height), RawImage) then
if RawImage_FromBitmap(RawImage, Bitmap.Handle, 0, Classes.Rect(0, 0, Data.Width, Data.Height)) then
FreeRawImageData(@RawImage);
RawImage.FreeData;
procedure BlendImageTo(WhatCanvas: TCanvas; ImageData : TImageData; SourceRect : classes.TRect; DestX, DestY : Integer; AlphaThreshold : Byte = 255);
var
ax, ay,
ix, iy : integer;
c32 : TColor32Rec;
begin
iy := DestY;
for ay := SourceRect.Top to SourceRect.Bottom do
begin
ix := DestX;
for ax := SourceRect.Left to SourceRect.Right do
begin
c32:= GetPixel32(ImageData, ax, ay);
if c32.A >= AlphaThreshold then
WhatCanvas.Pixels[ix, iy] := RGBToColor(c32.R, c32.G, c32.B);
inc(ix);
end;
inc(iy);
end;
end;
Of course thats extremely slow and not really a good way to perform the blit :(. It also doesn't handle the alpha blending, but hey it works :).
Page created in 0.012 seconds with 21 queries.