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. Database & SysAdmin
  3. Database
  4. getting the size of an image from DB

getting the size of an image from DB

Scheduled Pinned Locked Moved Database
questioncsharpdatabasehelp
4 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.
  • M Offline
    M Offline
    minkinin
    wrote on last edited by
    #1

    Hi guys howz!! I 'm trying to retrieve an image from the DB,how can I get the size of that image and display it on a picturebox,or what else can I use to display an image,'cause the picturebox doestn't have a scroll so as to be able to scroll & see the whole image?? pls help with a c# code. thanks in advance

    K T 2 Replies Last reply
    0
    • M minkinin

      Hi guys howz!! I 'm trying to retrieve an image from the DB,how can I get the size of that image and display it on a picturebox,or what else can I use to display an image,'cause the picturebox doestn't have a scroll so as to be able to scroll & see the whole image?? pls help with a c# code. thanks in advance

      K Offline
      K Offline
      Kedar Potdar
      wrote on last edited by
      #2

      Hi, You can think of some picture viewers whose controls are available. Google might prove to be best for it. Hope it might help, With warm regards, KEDAR

      1 Reply Last reply
      0
      • M minkinin

        Hi guys howz!! I 'm trying to retrieve an image from the DB,how can I get the size of that image and display it on a picturebox,or what else can I use to display an image,'cause the picturebox doestn't have a scroll so as to be able to scroll & see the whole image?? pls help with a c# code. thanks in advance

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

        If you don't want to try to automatically scale the image, you could also try putting the image control inside a Panel with scrollbars and a fixed size. As for getting the size of the image, that should not be too hard - if you're retrieving it from a database, you'll have to load the image from a stream, so you should be able to check the length of the byte array fetched from the table.

        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...’

        M 1 Reply Last reply
        0
        • T turbochimp

          If you don't want to try to automatically scale the image, you could also try putting the image control inside a Panel with scrollbars and a fixed size. As for getting the size of the image, that should not be too hard - if you're retrieving it from a database, you'll have to load the image from a stream, so you should be able to check the length of the byte array fetched from the table.

          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...’

          M Offline
          M Offline
          minkinin
          wrote on last edited by
          #4

          Thanks Turbochimp!! I used a picturebox inside a panel with scrollbars & fixed size,and is working exactly as I wanted. Thanks a lot Guys!!!:laugh:;P

          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