Jump to content
  • Advertisement

Archived

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

Link

ok, let's me to make bitmap image!

This topic is 5560 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

i would make with the helper of C++, an image 2x2 pixel (2 pixel hight and 2 pixel broad), so make a variable bitmap, and lay out all the values, so at the end same it in a real image resource .bmp What must i include (librery, links and so on...) in the project? what are the correct procedures i must follow to do it?

Share this post


Link to post
Share on other sites
Advertisement
if you want to load a bitmap into variables, you need to use binary file streams. There are a few tags before the actual image information, but putting it into variables is not that hard. I can get back to you with the specifics, but by that time many ppl will probably have answered...

_________________________________________
"Why, why why does everyone ask ''''why'''' when ''''how'''' is so much more fun"
-Spawn 1997

Share this post


Link to post
Share on other sites
Since you mention bmp I only ASSUME you are talking about Windows. You also don''t specify which API you are using (DirectX, OpenGL). Next time, please be specific about what platform, API you are using, etc.

For the Windows API, you can look at CreateBitmap to create the actual bitmap. You''ll have to construct the correct bitmap info header, etc. Follow the Windows API docs.

If you are using DirectX, create a texture in your app and save it to disk using D3DXSaveTextureToFile(). Follow the DirectX API docs.

Regards,
Jeff

Share this post


Link to post
Share on other sites
what i would to do is a simple program in which i can draw and then save the image in bitmap (why not also gif... )... what do u suggest me to use, Win API or DirectX??

(i reffer it to windows SO)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
you must have the rights to work if the gif format

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
you must have the rights to work if the gif format

Share this post


Link to post
Share on other sites
quote:
Original post by rypyr
I would use Win API, there is a lot less overhead.


ok, if i''m not succesful, can u help me?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!