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 / C++ / MFC
  4. Resolution of a bitmap in a .bmp file

Resolution of a bitmap in a .bmp file

Scheduled Pinned Locked Moved C / C++ / MFC
graphicstutorialquestioncode-review
8 Posts 3 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.
  • A Offline
    A Offline
    aasstt
    wrote on last edited by
    #1

    How to improve the resolution of a bitmap in a .bmp file. When I print the bitmap, its resolution is not good. Can anyone suggest me some code to improve its resolution??? aasstt

    Y H 2 Replies Last reply
    0
    • A aasstt

      How to improve the resolution of a bitmap in a .bmp file. When I print the bitmap, its resolution is not good. Can anyone suggest me some code to improve its resolution??? aasstt

      Y Offline
      Y Offline
      YaronNir
      wrote on last edited by
      #2

      The only reason i can think of that your bitmap resolution is not good, is because you strech it even not intently. make sure when you blit the bitmap, that the cx and cy are correct (meaning you got them right using the GetBitmapDimentions method).... Yaron Ask not what your application can do for you, Ask what you can do for your application

      A 1 Reply Last reply
      0
      • Y YaronNir

        The only reason i can think of that your bitmap resolution is not good, is because you strech it even not intently. make sure when you blit the bitmap, that the cx and cy are correct (meaning you got them right using the GetBitmapDimentions method).... Yaron Ask not what your application can do for you, Ask what you can do for your application

        A Offline
        A Offline
        aasstt
        wrote on last edited by
        #3

        I have created a compatible DC of the printer DC and then I have Converted DDB to DIB. Then I have written this DIB in a .bmp file. but when I open this file in Paint & give its print its resolution is not good. aasstt

        1 Reply Last reply
        0
        • A aasstt

          How to improve the resolution of a bitmap in a .bmp file. When I print the bitmap, its resolution is not good. Can anyone suggest me some code to improve its resolution??? aasstt

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          Can you be more specific.

          A 1 Reply Last reply
          0
          • H Hamid Taebi

            Can you be more specific.

            A Offline
            A Offline
            aasstt
            wrote on last edited by
            #5

            I have created a compatible DC(MemDC) of the printer DC. Then MemDC->SelectObject(bitmap) Then whatever I draw on the screen is drawn in memory. and then I have Converted this bitmap from DDB to DIB. Then I have written this DIB in a .bmp file. but when I open this file in Paint & give its print its resolution is not good i.e it is not appearing as a smooth image but an image with steps in it. aasstt

            H 1 Reply Last reply
            0
            • A aasstt

              I have created a compatible DC(MemDC) of the printer DC. Then MemDC->SelectObject(bitmap) Then whatever I draw on the screen is drawn in memory. and then I have Converted this bitmap from DDB to DIB. Then I have written this DIB in a .bmp file. but when I open this file in Paint & give its print its resolution is not good i.e it is not appearing as a smooth image but an image with steps in it. aasstt

              H Offline
              H Offline
              Hamid Taebi
              wrote on last edited by
              #6

              aasstt, I dont know your code but I use handle printer dc and I created bitmap or I load bitmap from file and then print and resolution isnt bad. Now you have bitmap from file or you created bitmap inside your program

              A 1 Reply Last reply
              0
              • H Hamid Taebi

                aasstt, I dont know your code but I use handle printer dc and I created bitmap or I load bitmap from file and then print and resolution isnt bad. Now you have bitmap from file or you created bitmap inside your program

                A Offline
                A Offline
                aasstt
                wrote on last edited by
                #7

                I have created the bitmap and then written that bitmap using the WriteDIB function(which I have downloaded from codeproject)in a .bmp file. aasstt

                H 1 Reply Last reply
                0
                • A aasstt

                  I have created the bitmap and then written that bitmap using the WriteDIB function(which I have downloaded from codeproject)in a .bmp file. aasstt

                  H Offline
                  H Offline
                  Hamid Taebi
                  wrote on last edited by
                  #8

                  if you have bitmap(that you created) why you directly print instead save to file and again loaded?if it has handle HBITMAP

                  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