On approximately 6/21/2004 7:53 PM, came the following characters from
the keyboard of Pavel:
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.

I don't know how to do any of the above with DIBitmap. I use Image::Magick for all programmed graphics manipulations.

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.

Is loading Image::Magic something you have to do at startup time? It is often a good technique to defer loading large modules until the first time they are needed, spreading out the startup time a bit.

So I responded, just to point out this idea, in case it is a new idea to you.

--
Glenn -- http://nevcal.com/
===========================
The best part about procrastination is that you are never bored,
because you have all kinds of things that you should be doing.


Reply via email to