Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Save a 4bpp Bitmap

Save a 4bpp Bitmap

Scheduled Pinned Locked Moved C#
graphicswinformshelptutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JoeSharp
    wrote on last edited by
    #1

    hi all i try to save a 4bpp bitmap in an memorystream. example: // Clone the original 4bpp bitmap Bitmap bmp = (Bitmap)image.Clone(); using(MemoryStream ms = new MemoryStream()) { bmp.Save(ms, ImageFormat.Bmp); } bmp.Dispose(); this code give me the following error: Error in GDI+ this code works fine but it convert the bitmap to a 32bpp format: using(Bitmap bmp = new Bitmap(image)) { using(MemoryStream ms = new MemoryStream()) { bmp.Save(ms, ImageFormat.Bmp); } } it is possible to save a 4bpp bitmap to a stream? regards JoeSharp

    L 1 Reply Last reply
    0
    • J JoeSharp

      hi all i try to save a 4bpp bitmap in an memorystream. example: // Clone the original 4bpp bitmap Bitmap bmp = (Bitmap)image.Clone(); using(MemoryStream ms = new MemoryStream()) { bmp.Save(ms, ImageFormat.Bmp); } bmp.Dispose(); this code give me the following error: Error in GDI+ this code works fine but it convert the bitmap to a 32bpp format: using(Bitmap bmp = new Bitmap(image)) { using(MemoryStream ms = new MemoryStream()) { bmp.Save(ms, ImageFormat.Bmp); } } it is possible to save a 4bpp bitmap to a stream? regards JoeSharp

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      I havent tried this, but from earlier posts on these message boards, I have got the impression Save only works for pixels that take 8 or more bits, not for 1 or 4 bits per pixel. And that is a pitty. :)

      Luc Pattyn

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups