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. Save Image

Save Image

Scheduled Pinned Locked Moved C#
question
5 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.
  • T Offline
    T Offline
    The_Soul_Of_Rock
    wrote on last edited by
    #1

    how can i save an image to a directory that i want with out using SaveFileDialog. Thanks Rock Throught The Night

    E 1 Reply Last reply
    0
    • T The_Soul_Of_Rock

      how can i save an image to a directory that i want with out using SaveFileDialog. Thanks Rock Throught The Night

      E Offline
      E Offline
      Edbert P
      wrote on last edited by
      #2

      The SaveFileDialog is only used to get directory path and the filename where you want to save the image into. It does not save your image into the directory. If you already know where to save the image, you can specify the path directly to your function that writes the image file. Edbert P. Sydney, Australia.

      T 1 Reply Last reply
      0
      • E Edbert P

        The SaveFileDialog is only used to get directory path and the filename where you want to save the image into. It does not save your image into the directory. If you already know where to save the image, you can specify the path directly to your function that writes the image file. Edbert P. Sydney, Australia.

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

        once more question: how to get the file extension. Thanks Rock Throught The Night

        R E 2 Replies Last reply
        0
        • T The_Soul_Of_Rock

          once more question: how to get the file extension. Thanks Rock Throught The Night

          R Offline
          R Offline
          Roman Rodov
          wrote on last edited by
          #4

          string ext = System.IO.Path.GetExtension(path); Don't people read help files anymore

          1 Reply Last reply
          0
          • T The_Soul_Of_Rock

            once more question: how to get the file extension. Thanks Rock Throught The Night

            E Offline
            E Offline
            Edbert P
            wrote on last edited by
            #5

            In C#, there is a function called GetExtension that can return extension name of a file given the file path. Here's a sample code: string fileName = @"C:\mydir.old\myfile.ext"; string extension; extension = Path.GetExtension(fileName); Console.WriteLine("GetExtension('{0}') returns '{1}'", fileName, extension); Hope it helps :) Edbert P. Sydney, Australia.

            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