Archived

This topic is now archived and is closed to further replies.

Image doesn't load properly

This topic is 6355 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When I try loading a Bitmap to the back buffer, the bitmap comes out sort of diagonal. I have no idea what''s the problem... Other bitmap''s I loaded are fine. The bitmap is 219x40, 24 bit (Converted to 16) I made the picture with Photoshop and then resaved it with PSP. Can anyone help ? Thanks, Tornado

Share this post


Link to post
Share on other sites
I''ve always been told that a bitmap must be a power of 2. But maybe I''m confusing textures versus a background image. Another thing you could check is the destination blt() to see if your using the whole screen as target. Specify the same size destination as your source bitmap and see what happens.

IceFire

Share this post


Link to post
Share on other sites
Yes, you are confusing Textures and Bitmaps
Bitmaps can be any size, so I guess the problem is with the bitmap...
I''ll play with PSP''s settings until I get it right
Thanks anyway

quote:
Original post by IceFire

I''ve always been told that a bitmap must be a power of 2. But maybe I''m confusing textures versus a background image. Another thing you could check is the destination blt() to see if your using the whole screen as target. Specify the same size destination as your source bitmap and see what happens.

IceFire



Share this post


Link to post
Share on other sites
"sort of diagonal" sounds like shearing, which can happen when your source and target widths do not match exactly and the image wraps wrong. And with such a wacky width of 219, that would be the first thing I''d check.

-R

Share this post


Link to post
Share on other sites
i'm assuming you're talking about .bmp format. Microsoft doesn't document this anywhere as far as i know but the width must be a multiple of 4 pixels i believe and and if its not a multiple of 4 it will be padded at the end of each horizontal line to make it so

So obviously you must take this into account. I believe there is some kind of cool bytewise operation you can perform that will leave numbers that are multiple of 4 as a multiple of 4 and if it isn't it will make it the next highest multiple of 4

Edited by - Theses on July 18, 2000 6:54:59 PM

Share this post


Link to post
Share on other sites