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. image properties

image properties

Scheduled Pinned Locked Moved ASP.NET
comgraphicstutorial
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.
  • S Offline
    S Offline
    shah zad
    wrote on last edited by
    #1

    hi i am developing an app in which i have to place different size of images on different portions of a page based on there width and height for that i have to recognise there size b4 displaying and i dont have images too they are dynamically changed on there urls i have only there urls i used the following method b4 but it dont work for urls System.Drawing.Image fullSizeImg = System.Drawing.Image.FromFile("c:\abc.jpg"); then imgWidth = fullSizeImg.width; but it dont work for System.Drawing.Image fullSizeImg = System.Drawing.Image.FromFile("http://images.apple.com/itunesaffiliates/US/2005/12/6/NBC/180x150\_BattlestarGalactica.jpg"); can any one guide me in this regard or tell me if there is any alternative for this looking forward thanks

    shezi

    G N 2 Replies Last reply
    0
    • S shah zad

      hi i am developing an app in which i have to place different size of images on different portions of a page based on there width and height for that i have to recognise there size b4 displaying and i dont have images too they are dynamically changed on there urls i have only there urls i used the following method b4 but it dont work for urls System.Drawing.Image fullSizeImg = System.Drawing.Image.FromFile("c:\abc.jpg"); then imgWidth = fullSizeImg.width; but it dont work for System.Drawing.Image fullSizeImg = System.Drawing.Image.FromFile("http://images.apple.com/itunesaffiliates/US/2005/12/6/NBC/180x150\_BattlestarGalactica.jpg"); can any one guide me in this regard or tell me if there is any alternative for this looking forward thanks

      shezi

      G Offline
      G Offline
      gauthee
      wrote on last edited by
      #2

      I guess there is an article related to create a thumbnail for an image, using that code snippet you can play around with the size of the image. Search for it!!!

      Gautham

      1 Reply Last reply
      0
      • S shah zad

        hi i am developing an app in which i have to place different size of images on different portions of a page based on there width and height for that i have to recognise there size b4 displaying and i dont have images too they are dynamically changed on there urls i have only there urls i used the following method b4 but it dont work for urls System.Drawing.Image fullSizeImg = System.Drawing.Image.FromFile("c:\abc.jpg"); then imgWidth = fullSizeImg.width; but it dont work for System.Drawing.Image fullSizeImg = System.Drawing.Image.FromFile("http://images.apple.com/itunesaffiliates/US/2005/12/6/NBC/180x150\_BattlestarGalactica.jpg"); can any one guide me in this regard or tell me if there is any alternative for this looking forward thanks

        shezi

        N Offline
        N Offline
        Naveed Kamboh
        wrote on last edited by
        #3

        I have done it for showin one image in a new window and it works you can check it on http://www.1st4beds.co.uk to see large picture of the products. You have to use image server control and make its height and width 0 and then pass image height and width as you are doing. It should work

        Naveed Kamboh

        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