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. c# function for Image Compression

c# function for Image Compression

Scheduled Pinned Locked Moved C#
csharpcssperformancelounge
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.
  • G Offline
    G Offline
    GauravKP
    wrote on last edited by
    #1

    hi.. I want to compress below 1kb to store on smart card which has usually less memory (1kb) , please suggest me some c# function ... The image is for general use.

    L B E 3 Replies Last reply
    0
    • G GauravKP

      hi.. I want to compress below 1kb to store on smart card which has usually less memory (1kb) , please suggest me some c# function ... The image is for general use.

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, you have asked similar things before. It wasn't clear then and it isn't clear now: do you need a way to reduce an image to a single block of data less than 1KB? or are you looking for ways to split it in several blocks of data each less than 1KB? And how large are your images (both in pixels and in KB when stored as JPEG)? and what is on your images: faces, landscapes, something synthetic? Could you show such an image? :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


      M 1 Reply Last reply
      0
      • L Luc Pattyn

        Hi, you have asked similar things before. It wasn't clear then and it isn't clear now: do you need a way to reduce an image to a single block of data less than 1KB? or are you looking for ways to split it in several blocks of data each less than 1KB? And how large are your images (both in pixels and in KB when stored as JPEG)? and what is on your images: faces, landscapes, something synthetic? Could you show such an image? :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


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

        Predicted answer to your questions... "Yes, That's exactly what I want. Can you give example"

        Life goes very fast. Tomorrow, today is already yesterday.

        L 1 Reply Last reply
        0
        • G GauravKP

          hi.. I want to compress below 1kb to store on smart card which has usually less memory (1kb) , please suggest me some c# function ... The image is for general use.

          B Offline
          B Offline
          benjymous
          wrote on last edited by
          #4

          If you want a colour image, I think you'll struggle - A 150x150 pixel jpeg photo saved at 1% quality, you get a file that's just a little bit bigger than 1kb. When you view it it's just a random selection of blotches that vaguely resemble the photo, if you stand a few feet away and squint, but its not recognisable as the original image. For black and white, you can get a black and white dithered 80x80 pixel image as a png saved to less than 1kb. Again, you really can't see any detail, and it's only recognisable if you squint. It all really depends on what you actually need to do. You might be better off keeping your images in a database, and just storing the db key on your card.

          Help me! I'm turning into a grapefruit! Buzzwords!

          1 Reply Last reply
          0
          • M musefan

            Predicted answer to your questions... "Yes, That's exactly what I want. Can you give example"

            Life goes very fast. Tomorrow, today is already yesterday.

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #5

            Of course I have an example ready. It will probably be an icon file if that conforms to the question. :)

            Luc Pattyn [Forum Guidelines] [My Articles]


            The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


            M 1 Reply Last reply
            0
            • L Luc Pattyn

              Of course I have an example ready. It will probably be an icon file if that conforms to the question. :)

              Luc Pattyn [Forum Guidelines] [My Articles]


              The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


              M Offline
              M Offline
              musefan
              wrote on last edited by
              #6

              Ah, you are well prepared as always ;)

              Life goes very fast. Tomorrow, today is already yesterday.

              L 1 Reply Last reply
              0
              • M musefan

                Ah, you are well prepared as always ;)

                Life goes very fast. Tomorrow, today is already yesterday.

                L Offline
                L Offline
                Luc Pattyn
                wrote on last edited by
                #7

                My king-sized toolbox is almost full, and so is my disk. :laugh:

                Luc Pattyn [Forum Guidelines] [My Articles]


                The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


                1 Reply Last reply
                0
                • G GauravKP

                  hi.. I want to compress below 1kb to store on smart card which has usually less memory (1kb) , please suggest me some c# function ... The image is for general use.

                  E Offline
                  E Offline
                  Ennis Ray Lynch Jr
                  wrote on last edited by
                  #8

                  Save the image as a 40x40 jpeg.

                  Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

                  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