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#
  4. Image.FromFile()

Image.FromFile()

Scheduled Pinned Locked Moved C#
graphicshelpquestion
5 Posts 4 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.
  • O Offline
    O Offline
    Os Sutrisno
    wrote on last edited by
    #1

    I can't seem to find and use the Image.FromFile method. MSDN states that there is this function available and I have already included: using System.Drawing Can anyone help me please? :sigh:

    Y 1 Reply Last reply
    0
    • O Os Sutrisno

      I can't seem to find and use the Image.FromFile method. MSDN states that there is this function available and I have already included: using System.Drawing Can anyone help me please? :sigh:

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

      Os Sutrisno wrote: find Find?:confused: See this.[^]


      Work hard, Work effectively.

      O 1 Reply Last reply
      0
      • Y Yulianto

        Os Sutrisno wrote: find Find?:confused: See this.[^]


        Work hard, Work effectively.

        O Offline
        O Offline
        Os Sutrisno
        wrote on last edited by
        #3

        Find as in when I type Image myPic = new Image. Intellisense doesn't list FromFile as one of the methods. Anyways, I found out what was going on ;P .Net Compact Framework doesn't support Image.FromFile :doh:

        M S 2 Replies Last reply
        0
        • O Os Sutrisno

          Find as in when I type Image myPic = new Image. Intellisense doesn't list FromFile as one of the methods. Anyways, I found out what was going on ;P .Net Compact Framework doesn't support Image.FromFile :doh:

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

          Image class cann't be instantiated from,You must do it from Bitmap().

          1 Reply Last reply
          0
          • O Os Sutrisno

            Find as in when I type Image myPic = new Image. Intellisense doesn't list FromFile as one of the methods. Anyways, I found out what was going on ;P .Net Compact Framework doesn't support Image.FromFile :doh:

            S Offline
            S Offline
            Susan Hernandez
            wrote on last edited by
            #5

            The FromFile method is a static method. Therefore, you do not call it from an instantiation of the object, you call it right from the Class itself. Wrong: Image myPic = new Image; myPic.FromFile("someFileName");// WRONG Correct: Image myPic = Image.FromFile("someFileName");// Correct :)

            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