Help, program crashes in D2 when using BrushCopy method

Hi!
I have a BIG problem, when I use the BrushCopy method with a bitmap
with a height or width of 2048 or larger in D2 the program crashes.
When using the same bitmap and method in D1 it works just fine.

I'm using the following procedure to draw a bitmap transparent on a
canvas (It's part of a component).
When the program reaches the first line with BrushCopy it chrashes
(the width or height of the bitmap is 2048 or larger).

I hope somebody will answer me, it's wery important that this problem
is solved..

(Work=destination canvas: x,y=startpoint for draw: source=bitmap to be
drawn: TC=color in bitmap to be transparent)

procedure
DrawTransparent(Work:TCanvas;x,y:integer;Source:TBitmap;TC:TColor);
var ANDBitmap, ORBitmap: TBitmap;
    CM: TCopyMode;
    Src: TRect;
begin
  ANDBitmap:= NIL;
  ORBitmap:=  NIL;
  try
  ANDBitmap:= TBitmap.Create;
  ORBitmap:= TBitmap.Create;
  Src  := Bounds(0,0, Source.Width, Source.Height);
  with ORBitmap do begin
    Width:= Source.Width;
    Height:= Source.Height;
    Canvas.Brush.Color := clBlack;
    Canvas.CopyMode := cmSrcCopy;
    Canvas.BrushCopy(Src, Source, Src, TC);
    end;
  with ANDBitmap do begin
    Width:= Source.Width;
    Height:= Source.Height;
    Canvas.Brush.Color := clWhite;
    Canvas.CopyMode := cmSrcInvert;
    Canvas.BrushCopy(Src, Source, Src, TC);
    end;
  with Work do begin
    CM := CopyMode;
    CopyMode := cmSrcAnd;
    Draw(X,Y, ANDBitmap);
    CopyMode := cmSrcPaint;
    Draw(X,Y, ORBitmap);
    CopyMode := CM;
    end;
  finally
  ANDBitmap.Free;
  ORBitmap.Free;
  end;
end;

Leif L

E-Mail:Byte...@Bigfoot.com