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. how can i save the images,circles,rectangle,lines or etc together..

how can i save the images,circles,rectangle,lines or etc together..

Scheduled Pinned Locked Moved C#
graphicsquestion
8 Posts 5 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
    maifs
    wrote on last edited by
    #1

    how can i save the images,circles,rectangle,lines or etc together.. if somebody knows it then plz explain me with some code... i konw that image can be save via one of the Bitmap's method i.e: imageObj.Save(fileName); but i want to save not only images , whole it(e.g: circles,rectangles,lines which a user is drawn on it) not a just an image. plz dont send the source of anyother site because i m new commer

    hghghgh

    L P O P 4 Replies Last reply
    0
    • M maifs

      how can i save the images,circles,rectangle,lines or etc together.. if somebody knows it then plz explain me with some code... i konw that image can be save via one of the Bitmap's method i.e: imageObj.Save(fileName); but i want to save not only images , whole it(e.g: circles,rectangles,lines which a user is drawn on it) not a just an image. plz dont send the source of anyother site because i m new commer

      hghghgh

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      If someone knows the answer, they would answer your first post. Posting again isn't going to make things any better.

      Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Individuality is fine, as long as we do it together - F. Burns

      M 1 Reply Last reply
      0
      • L Lost User

        If someone knows the answer, they would answer your first post. Posting again isn't going to make things any better.

        Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Individuality is fine, as long as we do it together - F. Burns

        M Offline
        M Offline
        maifs
        wrote on last edited by
        #3

        yes i made a mistake but what should i do, when nobody anser me..

        hghghgh

        L 1 Reply Last reply
        0
        • M maifs

          yes i made a mistake but what should i do, when nobody anser me..

          hghghgh

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          The first thing to remember is that no one here is a professional answer person. We do it to help each other. If you are not getting an answer, we don't know or can't figure out what you are trying to do. Try google for an answer to your situation. Many times a simple google search will get you an answer faster than posting on a forum. Try re-stating what you are trying to do in plain simple english. Include what you have tried to do that did not work. Patience.

          Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Individuality is fine, as long as we do it together - F. Burns

          M 1 Reply Last reply
          0
          • M maifs

            how can i save the images,circles,rectangle,lines or etc together.. if somebody knows it then plz explain me with some code... i konw that image can be save via one of the Bitmap's method i.e: imageObj.Save(fileName); but i want to save not only images , whole it(e.g: circles,rectangles,lines which a user is drawn on it) not a just an image. plz dont send the source of anyother site because i m new commer

            hghghgh

            P Offline
            P Offline
            Pedram Behroozi
            wrote on last edited by
            #5

            I can't clearly understand what you're looking for but I think you should know what you want to save. For example if you want to save a rectangle properties you have to save it's location, size, color,... in a database (file, sql,...) and load them when user executes your application. But if you explain some more, I think we can help you better.

            1 Reply Last reply
            0
            • M maifs

              how can i save the images,circles,rectangle,lines or etc together.. if somebody knows it then plz explain me with some code... i konw that image can be save via one of the Bitmap's method i.e: imageObj.Save(fileName); but i want to save not only images , whole it(e.g: circles,rectangles,lines which a user is drawn on it) not a just an image. plz dont send the source of anyother site because i m new commer

              hghghgh

              O Offline
              O Offline
              oobimoo
              wrote on last edited by
              #6

              Use GraphicsPath. Unfortunately you can't serialize a GraphicsPath oblect, but you can save the PathPoints[^] array, PathTypes[^] array and the FillMode[^], and then restore the GraphicsPath by the GraphicsPath Constructor (Point[], Byte[], FillMode)[^]. Also keep extra info for the colors of pens or brushes etc, that you use to draw or fill a GraphicsPath.

              1 Reply Last reply
              0
              • L Lost User

                The first thing to remember is that no one here is a professional answer person. We do it to help each other. If you are not getting an answer, we don't know or can't figure out what you are trying to do. Try google for an answer to your situation. Many times a simple google search will get you an answer faster than posting on a forum. Try re-stating what you are trying to do in plain simple english. Include what you have tried to do that did not work. Patience.

                Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Individuality is fine, as long as we do it together - F. Burns

                M Offline
                M Offline
                maifs
                wrote on last edited by
                #7

                Sorry.......... i am making an image editor ..... this image editor can draw circle,rectangles and images.... the problem is that i am facing i want to save it..

                hghghgh

                1 Reply Last reply
                0
                • M maifs

                  how can i save the images,circles,rectangle,lines or etc together.. if somebody knows it then plz explain me with some code... i konw that image can be save via one of the Bitmap's method i.e: imageObj.Save(fileName); but i want to save not only images , whole it(e.g: circles,rectangles,lines which a user is drawn on it) not a just an image. plz dont send the source of anyother site because i m new commer

                  hghghgh

                  P Offline
                  P Offline
                  Pete OHanlon
                  wrote on last edited by
                  #8

                  The normal mechanism for performing this is to make each image item an object in its own right, possibly inheriting from a common base class, and then each item is responsible for writing the information to the serialization stream under the control of some form of "canvas". Typically, your base class might look like this:

                  public abstract class ImageBase
                  {
                  public int X { get; set; }
                  public int Y { get; set; }
                  public int Width { get; set; }
                  public int Height { get; set; }
                  // More properties

                  public virtual ImageBase Save()
                  {
                  }

                  public virtual void Load(/* some form of stream */ item)
                  {
                  // Rehydrate the object from the stream.
                  }
                  }

                  Deja View - the feeling that you've seen this post before.

                  My blog | My articles | MoXAML PowerToys

                  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