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. Graphics
  4. Is it possible to avoid decimation when drawing a bitmap?

Is it possible to avoid decimation when drawing a bitmap?

Scheduled Pinned Locked Moved Graphics
graphicsdata-structuresquestion
8 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
    Jim Warburton
    wrote on last edited by
    #1

    I have a series of incoming byte arrays of unknown size (range can be anywhere from 1667 to 51200, but once the size is set it should stay steady for long periods but may change). The value contained in each element is a shade of grey. Currently the bitmap is in a fixed size PictureBox with the result the bitmap has a max height of 900. The incoming array is decimated to 900 for full display. The whole (or as much as is left after decimating) needs to be visible, there is no zooming. It is a waterfall display so once the bitmap width is full, the incoming array causes the oldest to "disappear". Is there a way to, something other than a bitmap or picture box perhaps, to reduce/eliminate the decimation with out having to increase the size taken up on the screen? Thanks Jim

    M 1 Reply Last reply
    0
    • J Jim Warburton

      I have a series of incoming byte arrays of unknown size (range can be anywhere from 1667 to 51200, but once the size is set it should stay steady for long periods but may change). The value contained in each element is a shade of grey. Currently the bitmap is in a fixed size PictureBox with the result the bitmap has a max height of 900. The incoming array is decimated to 900 for full display. The whole (or as much as is left after decimating) needs to be visible, there is no zooming. It is a waterfall display so once the bitmap width is full, the incoming array causes the oldest to "disappear". Is there a way to, something other than a bitmap or picture box perhaps, to reduce/eliminate the decimation with out having to increase the size taken up on the screen? Thanks Jim

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      If you have more pixels in the bitmap than will fit in the area you want to render them, then how can you render the pixels without some kind of decimation? Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      J 1 Reply Last reply
      0
      • M Mark Salsbery

        If you have more pixels in the bitmap than will fit in the area you want to render them, then how can you render the pixels without some kind of decimation? Mark

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        J Offline
        J Offline
        Jim Warburton
        wrote on last edited by
        #3

        My hope is (was?) there is some other method other than a bitmap I can use to avoid or reduce the decimation. Side note, the bitmap appears to be hard coded to a max of 32K. Yes, if there are more pixels than the bitmap will hold there will be some kind of decimation. Jim

        this thing looks like it was written by an epileptic ferret Dave Kreskowiak

        M 2 Replies Last reply
        0
        • J Jim Warburton

          My hope is (was?) there is some other method other than a bitmap I can use to avoid or reduce the decimation. Side note, the bitmap appears to be hard coded to a max of 32K. Yes, if there are more pixels than the bitmap will hold there will be some kind of decimation. Jim

          this thing looks like it was written by an epileptic ferret Dave Kreskowiak

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          32K bitmap dimensions are a limit of GDI. You may want to take a look at GDI+[^] instead of GDI. GDI+ works with larger bitmap dimensions and has a variety of built-in interpolation modes for stretching bitmaps. Mark

          Mark Salsbery Microsoft MVP - Visual C++ :java:

          1 Reply Last reply
          0
          • J Jim Warburton

            My hope is (was?) there is some other method other than a bitmap I can use to avoid or reduce the decimation. Side note, the bitmap appears to be hard coded to a max of 32K. Yes, if there are more pixels than the bitmap will hold there will be some kind of decimation. Jim

            this thing looks like it was written by an epileptic ferret Dave Kreskowiak

            M Offline
            M Offline
            Mark Salsbery
            wrote on last edited by
            #5

            What language are you coding in? Mark

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            J 1 Reply Last reply
            0
            • M Mark Salsbery

              What language are you coding in? Mark

              Mark Salsbery Microsoft MVP - Visual C++ :java:

              J Offline
              J Offline
              Jim Warburton
              wrote on last edited by
              #6

              I am coding with C# in VS2005 (may be able to get access to VS2008). I will take a look at GDI+, thanks. Jim

              this thing looks like it was written by an epileptic ferret Dave Kreskowiak

              M 1 Reply Last reply
              0
              • J Jim Warburton

                I am coding with C# in VS2005 (may be able to get access to VS2008). I will take a look at GDI+, thanks. Jim

                this thing looks like it was written by an epileptic ferret Dave Kreskowiak

                M Offline
                M Offline
                Mark Salsbery
                wrote on last edited by
                #7

                jimwawar wrote:

                I am coding with C# in VS2005

                In that case, look at the System.Drawing namespace - classes like Graphics and Bitmap. These use GDI+ internally :) Mark

                Mark Salsbery Microsoft MVP - Visual C++ :java:

                J 1 Reply Last reply
                0
                • M Mark Salsbery

                  jimwawar wrote:

                  I am coding with C# in VS2005

                  In that case, look at the System.Drawing namespace - classes like Graphics and Bitmap. These use GDI+ internally :) Mark

                  Mark Salsbery Microsoft MVP - Visual C++ :java:

                  J Offline
                  J Offline
                  Jim Warburton
                  wrote on last edited by
                  #8

                  Thanks Mark.

                  this thing looks like it was written by an epileptic ferret Dave Kreskowiak

                  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