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 / C++ / MFC
  4. How can i create .jpg file programatically

How can i create .jpg file programatically

Scheduled Pinned Locked Moved C / C++ / MFC
question
14 Posts 8 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.
  • R Rajesh R Subramanian

    Two steps: 1. Draw your text to a bitmap. 2. Compress it to JPEG.

    It is a crappy thing, but it's life -^ Carlo Pallini

    P Offline
    P Offline
    PankajB
    wrote on last edited by
    #5

    I want to do this programatically. I think you have suggested using some tool may be mspaint. If you are talking about through the cose itself, then please provide more details in raegrd to the sugegsted steps. Thanks.

    R 1 Reply Last reply
    0
    • P PankajB

      Not yet. I was mainly looking for some sample code that can do the trick. Can you please provide some pointers to do the same?

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #6

      PankajB wrote:

      Can you please provide some pointers to do the same?

      See here.

      "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      1 Reply Last reply
      0
      • P PankajB

        Not yet. I was mainly looking for some sample code that can do the trick. Can you please provide some pointers to do the same?

        R Offline
        R Offline
        Rajesh R Subramanian
        wrote on last edited by
        #7

        Have you searched the internet and CP? Usually, nobody feels like offering any help to people who are not willing to help themselves. Not to mention you're asking for "the code" to do something that's extremely trivial. Like I said, in my other reply to you, there are two steps to it. Go ahead, give it a try and come back with a specific question if at all.

        It is a crappy thing, but it's life -^ Carlo Pallini

        1 Reply Last reply
        0
        • P PankajB

          I want to do this programatically. I think you have suggested using some tool may be mspaint. If you are talking about through the cose itself, then please provide more details in raegrd to the sugegsted steps. Thanks.

          R Offline
          R Offline
          Rajesh R Subramanian
          wrote on last edited by
          #8

          I knew you wanted to do it programmatically. Have a look at Drawing lines, shapes, or text on bitmaps[^] and then you'll be left with compressing a bitmap to JPEG. A search must bring up an example, if you ask me.

          It is a crappy thing, but it's life -^ Carlo Pallini

          1 Reply Last reply
          0
          • P PankajB

            Hi there. I want to create jpg file programmatically. Lets say I have some text "Hello", Now I want to create a jpg file that contains this text. Thanks PanB

            M Offline
            M Offline
            Maximilien
            wrote on last edited by
            #9

            Have a look at the jpeglib[^] stuff. IMO, it's not an easy task if you want to do it completely manual. Like other said, create an in-memory bitmap and save-as jpg with a known API like CImage or something similar.

            This signature was proudly tested on animals.

            P 1 Reply Last reply
            0
            • M Maximilien

              Have a look at the jpeglib[^] stuff. IMO, it's not an easy task if you want to do it completely manual. Like other said, create an in-memory bitmap and save-as jpg with a known API like CImage or something similar.

              This signature was proudly tested on animals.

              P Offline
              P Offline
              PankajB
              wrote on last edited by
              #10

              Thanks Guys.

              1 Reply Last reply
              0
              • P PankajB

                Hi there. I want to create jpg file programmatically. Lets say I have some text "Hello", Now I want to create a jpg file that contains this text. Thanks PanB

                H Offline
                H Offline
                Hamid Taebi
                wrote on last edited by
                #11

                If you like to see more info about jpg format see CXImage article on the codeproject it has helpful info for you.

                Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

                1 Reply Last reply
                0
                • P PankajB

                  Hi there. I want to create jpg file programmatically. Lets say I have some text "Hello", Now I want to create a jpg file that contains this text. Thanks PanB

                  CPalliniC Offline
                  CPalliniC Offline
                  CPallini
                  wrote on last edited by
                  #12

                  Let me google your question for you. :)

                  If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                  This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                  [My articles]

                  In testa che avete, signor di Ceprano?

                  O 1 Reply Last reply
                  0
                  • CPalliniC CPallini

                    Let me google your question for you. :)

                    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                    [My articles]

                    O Offline
                    O Offline
                    only_jack
                    wrote on last edited by
                    #13

                    lol very funny :laugh:

                    1 Reply Last reply
                    0
                    • P PankajB

                      Hi there. I want to create jpg file programmatically. Lets say I have some text "Hello", Now I want to create a jpg file that contains this text. Thanks PanB

                      C Offline
                      C Offline
                      Chris Losinger
                      wrote on last edited by
                      #14

                      http://www.smalleranimals.com/jpegfile.htm[^]

                      image processing toolkits | batch image processing

                      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