Hi All,

I am trying to create a new image from two images, first with size
100x100 pixel, and second with size 50x100 pixel. But I have no idea
about usage of Paste method (or Composite).

use strict;
use warnings;
use Win32::GUI::DIBitmap;
my $bg = newFromFile Win32::GUI::DIBitmap ('bg.bmp'); # 24bit 100x100 pixel
my $fg = newFromFile Win32::GUI::DIBitmap ('fg.bmp'); # 24bit 50x100 pixel
Win32::GUI::DIBitmap::Paste($fg,$bg,0,0,60);
Win32::GUI::DIBitmap::SaveToFile($bg,"1.bmp"); ##
Win32::GUI::DIBitmap::SaveToFile($fg,"2.bmp");


Another question: How can I create Bitmap on the fly with given size and color
with Win32::GUI::DIBitmap package?

my $nix = new Win32::GUI::DIBitmap (64,64,32);

it create black bitmap. How can I apply color on it?

thanks.

P.S. I know about existence of GD and Image::Magic but the script
takes already several seconds to launch, with GD or Image::Magic it
will start unacceptable longer.

--
Pavel


Reply via email to