Join Bitmaps

S

shapper

Hello,

Is it possible to join 4 Bitmap objects into a single one and have the
result converted to a Byte[]?

Thank You,
Miguel
 
V

vanderghast

If you are targetting graphical rendering with WPF or Managed DirectX, you
can take a look at "Texture". Such a ressource can indeed contains multiple
'regions' (roof, each walls, ... ) inside one 'bitmap' and the rendering
relay on coordinates to reach the right sub-region
(http://msdn.microsoft.com/en-us/library/aa451368.aspx). Some editors are
available for free (such as Dxtex.exe,
http://msdn.microsoft.com/en-us/library/ee417856(VS.85).aspx). Sure, if you
want to create dynamically those textures, that is another problem.

Vanderghast, Access MVP
 
J

Jeff Johnson

Is it possible to join 4 Bitmap objects into a single one and have the
result converted to a Byte[]?

Yes, it's possible, but there are no built-in methods to do this for you.
You'll have to create a new bitmap and then draw the 4 onto it. (Actually,
you could probably create the first bitmap from one and then only have to
draw the other three, but either way you're going to be using a Graphics
object.) Then to turn the resulting bitmap into a byte array you'll just use
the Save() method to write the data to a MemoryStream, from which you can
then extract a byte array.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top