-
1 Attachment(s)
BitBlt help needed
I have a picture that i want to BitBlt to a formso that the background of the picture is transperent. In the past, i would bitblt a picture with a black background, then bitblt a mask that had the picture replaced with black and the background white. i just got a stack of 200 or so bmps that i want to use in a game, but they are all color pictures with white backgrounds. i thought i would just include a sub in my game to make a mask and a black-background pic from the original pic, but it takes too long. Any ideas on how to improve it so it cane do this with 200 pics in a second or so?
-
In Paint Shop Pro (evaluation available @ www.jasc.com), you can do batch jobs of turning the contrast to full, which will make anything non-white black. Then you can use vbMergePaint as the Raster Op for the mask, and vbSrcAnd for the full-colour sprite. Note that the API's MergePaint does not work.
-
What im trying to avoid is having to go into a pic program to edit the pics, then save them under a new name. I just want a simple proc, sub, or func that will change the pic for me because 200+ pics is alot of pics to edit.
-
Like I said, BATCH job. You can do entire directories at a time.
-
two small problems with your aproach;
1) I don't have paint shop pro. All I have is MS paint.
2) I would like the prog to do it for me so i only have to have 1 copy of each pic on my hd, and so i dont have to load 2 pics, then bitblt them together.
-
Okay, start reading my posts :D
An evaluation is avaiable, which is fully functional and lasts for 30 days. I guess making the masks wouldn't be too much of a problem, if you use GetDIBits. It would then be blazing fast, but that's all I can think of.