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. Web Development
  3. ASP.NET
  4. retrieve image's width and height

retrieve image's width and height

Scheduled Pinned Locked Moved ASP.NET
databasesql-serversysadminquestion
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.
  • A Offline
    A Offline
    amit__8
    wrote on last edited by
    #1

    how can i retrieve image's width and height. image i saved in database table in sql server in byte format i am aleady retreieving image into a image button

    T 1 Reply Last reply
    0
    • A amit__8

      how can i retrieve image's width and height. image i saved in database table in sql server in byte format i am aleady retreieving image into a image button

      T Offline
      T Offline
      turbochimp
      wrote on last edited by
      #2

      The System.Drawing.Image class exposes width and height properties. How are you retrieving the image (into what kind of structure, I mean)? I assume that if you're storing it as a BLOB in the database, you're retrieving it as a byte[] initially. If so, you should be able to create a memory stream from the byte array, and use the stream to create an Image instance.

      The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’

      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