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. How to know the width and height of an Image?

How to know the width and height of an Image?

Scheduled Pinned Locked Moved C / C++ / MFC
questiondata-structurestutorial
3 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.
  • K Offline
    K Offline
    kapardhi
    wrote on last edited by
    #1

    Hai! I have byte array of an image (Image can be .bmp or .jpg or .jp2) Now how can i know the width and height of the image present in byte array? Thanks!

    M C 2 Replies Last reply
    0
    • K kapardhi

      Hai! I have byte array of an image (Image can be .bmp or .jpg or .jp2) Now how can i know the width and height of the image present in byte array? Thanks!

      M Offline
      M Offline
      Madhu Nair 0
      wrote on last edited by
      #2

      kapardhi wrote:

      the width and height of the image present in byte array?

      From a CBitmap object ? Its written here[^]

      1 Reply Last reply
      0
      • K kapardhi

        Hai! I have byte array of an image (Image can be .bmp or .jpg or .jp2) Now how can i know the width and height of the image present in byte array? Thanks!

        C Offline
        C Offline
        Chris Losinger
        wrote on last edited by
        #3

        BYTE *pImage = new BYTE[4000]; there is no width and height of a byte array. if the byte array holds image pixels, then whoever gives you the byte array will also have to tell you the image dimensions. if the byte array holds an encoded image file, then you will have to decode/parse the format.

        image processing toolkits | batch image processing

        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