Sign in to follow this  
Nokame

splitting bitmaps into cells

Recommended Posts

I want to split my bitmaps into cells... how do i do that using LoadImage? in my create_surface function i have it do the loadimage into an HBITMAP, then i pass that hbitmap to a load_surface... which loads the surface with the bitmap... so... in creating the surface i figure i need to specifiy where on the bitmap it needs to extract pixels... and i can't figure how to do that... because it seems like LoadImage just starts at 0,0 no matter what i do...

Share this post


Link to post
Share on other sites
LoadImage() will load the entire image no matter what. If you only care about a certain section your load_surface will have to find that section in the bitmap. What you might find easy is to create a temporary bitmap of the appropriate size, then call BitBlt() to copy over a section of the original into the temporary, and then call load_surface on that temporary bitmap.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this