Results 1 to 6 of 6

Thread: BitBlt help needed

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Location
    USA all the way!
    Posts
    82

    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?
    Attached Files Attached Files
    Often talked of, never seen,
    Ever coming, never been,
    Daily looked for, never here,
    Still approaching, coming near,
    Thousands for its visit wait,
    But alas for their fate,
    Tho' they expect me to appear,
    They will never find me here.

    What's this about?

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    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.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Location
    USA all the way!
    Posts
    82
    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.
    Often talked of, never seen,
    Ever coming, never been,
    Daily looked for, never here,
    Still approaching, coming near,
    Thousands for its visit wait,
    But alas for their fate,
    Tho' they expect me to appear,
    They will never find me here.

    What's this about?

  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Like I said, BATCH job. You can do entire directories at a time.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Location
    USA all the way!
    Posts
    82
    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.
    Often talked of, never seen,
    Ever coming, never been,
    Daily looked for, never here,
    Still approaching, coming near,
    Thousands for its visit wait,
    But alas for their fate,
    Tho' they expect me to appear,
    They will never find me here.

    What's this about?

  6. #6
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Okay, start reading my posts

    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.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width