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. OUT OF Memory

OUT OF Memory

Scheduled Pinned Locked Moved C#
csharpperformancehelp
8 Posts 6 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.
  • J Offline
    J Offline
    Jeeva Jose
    wrote on last edited by
    #1

    I can't able to load large images in C#. The loading time to get OUT OF MEMORY Exception.Please help me...... :(( :((

    Continue...

    N Z N C A 5 Replies Last reply
    0
    • J Jeeva Jose

      I can't able to load large images in C#. The loading time to get OUT OF MEMORY Exception.Please help me...... :(( :((

      Continue...

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Jeeva Jose wrote:

      I can't able to load large images in C#.

      Let us see your code.

      All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

      J 1 Reply Last reply
      0
      • J Jeeva Jose

        I can't able to load large images in C#. The loading time to get OUT OF MEMORY Exception.Please help me...... :(( :((

        Continue...

        Z Offline
        Z Offline
        Zoltan Balazs
        wrote on last edited by
        #3

        can't able? you don't have to! it's the computers fault! damn!

        Work @ Network integrated solutions | Flickr | A practical use of the MVC pattern

        1 Reply Last reply
        0
        • J Jeeva Jose

          I can't able to load large images in C#. The loading time to get OUT OF MEMORY Exception.Please help me...... :(( :((

          Continue...

          N Offline
          N Offline
          Nouman Bhatti
          wrote on last edited by
          #4

          i think you should increase your RAM.

          1 Reply Last reply
          0
          • N N a v a n e e t h

            Jeeva Jose wrote:

            I can't able to load large images in C#.

            Let us see your code.

            All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

            J Offline
            J Offline
            Jeeva Jose
            wrote on last edited by
            #5

            Try to load the image 10248 W and H 14173. Sure U will get Exception

            Continue...

            Z 1 Reply Last reply
            0
            • J Jeeva Jose

              I can't able to load large images in C#. The loading time to get OUT OF MEMORY Exception.Please help me...... :(( :((

              Continue...

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              C# does not do anything optimised to load imags. Multiple your width x height x 3 and you have the minimum number of bytes needed to load an image. No way around that without seeking out some sort of third part tiling library

              Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

              1 Reply Last reply
              0
              • J Jeeva Jose

                Try to load the image 10248 W and H 14173. Sure U will get Exception

                Continue...

                Z Offline
                Z Offline
                Zoltan Balazs
                wrote on last edited by
                #7

                It can be done, check out Paint.NET[^]. Study the sources maybe it will help you out.

                Work @ Network integrated solutions | Flickr | A practical use of the MVC pattern

                1 Reply Last reply
                0
                • J Jeeva Jose

                  I can't able to load large images in C#. The loading time to get OUT OF MEMORY Exception.Please help me...... :(( :((

                  Continue...

                  A Offline
                  A Offline
                  Anthony Mushrow
                  wrote on last edited by
                  #8

                  A possible way to load large images would be to convert the file to a BMP or similar, strip out the header, and then use a FileStream to read a block of bytes (you'll need the width of the image, which you can get from the header). Then you'd have to turn your bytes into a bitmap. In a windows bitmap, there should be three bytes per pixel, and in the order BGR. Of course, there are a few problems i see. It will probably be quite slow, rather difficult, you'd have to be able to convert the whole image on the fly before using it, again, thats gonna suck up some time, especially with such HUGE images.

                  My current favourite word is: Bacon!

                  -SK Genius

                  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