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. Graphics
  4. is there size limit for displaying an image?

is there size limit for displaying an image?

Scheduled Pinned Locked Moved Graphics
graphicswinformsgame-devquestion
9 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.
  • K Offline
    K Offline
    King Tran
    wrote on last edited by
    #1

    i want to display an image which is over 400M size by the following ways: 1) GDI+ 2)OPenGL (load the image as texture) but it dosn't work, since i can display little size image by these two methods, is there size limit to display so big image? thanks

    L P E J 4 Replies Last reply
    0
    • K King Tran

      i want to display an image which is over 400M size by the following ways: 1) GDI+ 2)OPenGL (load the image as texture) but it dosn't work, since i can display little size image by these two methods, is there size limit to display so big image? thanks

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

      Hi, what is the size of your image (width and height in pixels)?

      Lao Wang wrote:

      it dosn't work

      What does that mean? Do you have code that does not compile, if so show the error message. Do you get an exception at run-time, if so show us the code and the entire exception.ToString(). :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      this months tips: - use PRE tags to preserve formatting when showing multi-line code snippets - before you ask a question here, search CodeProject, then Google


      K 1 Reply Last reply
      0
      • L Luc Pattyn

        Hi, what is the size of your image (width and height in pixels)?

        Lao Wang wrote:

        it dosn't work

        What does that mean? Do you have code that does not compile, if so show the error message. Do you get an exception at run-time, if so show us the code and the entire exception.ToString(). :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        this months tips: - use PRE tags to preserve formatting when showing multi-line code snippets - before you ask a question here, search CodeProject, then Google


        K Offline
        K Offline
        King Tran
        wrote on last edited by
        #3

        thanks Pattyn: the size of my image is 29000*15000. there is no compile error, no run-time exception yet. i can display an image of 9000*5000 size through GDI+ and OpenGL, but display nothing with the big image of 29000*15000. so i want to know is there size limit of displaying an image by GDI+ and OpenGL?:)

        1 Reply Last reply
        0
        • K King Tran

          i want to display an image which is over 400M size by the following ways: 1) GDI+ 2)OPenGL (load the image as texture) but it dosn't work, since i can display little size image by these two methods, is there size limit to display so big image? thanks

          P Offline
          P Offline
          Paul Conrad
          wrote on last edited by
          #4

          Is it possible to break the picture down into smaller tiles ( I doubt the user is looking at the whole picture at once )?

          "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

          D 1 Reply Last reply
          0
          • K King Tran

            i want to display an image which is over 400M size by the following ways: 1) GDI+ 2)OPenGL (load the image as texture) but it dosn't work, since i can display little size image by these two methods, is there size limit to display so big image? thanks

            E Offline
            E Offline
            El Corazon
            wrote on last edited by
            #5

            Lao Wang wrote:

            i want to display an image which is over 400M size by the following ways:

            "display" is relative to your display, which theoretically is probably maxing out at 2560x1600 assuming a very nice monitor. Parse is another issue. One method is through a form of Level of Detail mapping for imagery, you can zoom into any portion of a very large image, yet not have anything more than 512x512 on any given cell. You break the cells into quads and those quads into quads, and those quads into quads, etc. until you reach full resolution. Then the hard-part is paging those in and out. Real memory becomes a cache for tiles loaded off disk. Now you can pull any given section rapidly. The primary advantage of tiling is that it allows you to combine multiple things all tiled off the same zone. This is extremely common for imagery related to terrain as terrain elevation can be tiled as well as imagery, perhaps as well as soil, or vegetation, or other layers of information. Each layer of information may have a different size, but be tiled the same. Elevation could be 64x64 while satellite imagery 512x512, while soil types are 32x32 and vegetation 64x64. Tiling is common for two sources together, and more common the more layers you have to use together. It is very difficult and often expensive (performance wise) not to tile multiple layers. Another method is through windowed compression. This is probably the easiest, though depending on the data source not always as good looking. ECW free version limits your images to 500M which is within your limits. A GNU license or commercial license will buy you unlimited sizes (limited by your hardware of course). ECW and Jpeg2000 are wavelet compression which is very easy to window. You can then store the entire image on disk as compressed wavelet information, and extract the "window" of the visible portions of the image. ECW and Jpeg 2000[^] Tiling textures[^] Image Clipmapping[^]

            D 1 Reply Last reply
            0
            • P Paul Conrad

              Is it possible to break the picture down into smaller tiles ( I doubt the user is looking at the whole picture at once )?

              "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

              D Offline
              D Offline
              Dan Neely
              wrote on last edited by
              #6

              Adobe applications can display images that large, but nothing I've tried under win32 (including several OSS apps that could do it under *nix(64?)) was able to load the one image that big that I tried. I assume they're using some sort of divide and conquer approach instead of just trying to use the API native constructs.

              -- If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.

              1 Reply Last reply
              0
              • E El Corazon

                Lao Wang wrote:

                i want to display an image which is over 400M size by the following ways:

                "display" is relative to your display, which theoretically is probably maxing out at 2560x1600 assuming a very nice monitor. Parse is another issue. One method is through a form of Level of Detail mapping for imagery, you can zoom into any portion of a very large image, yet not have anything more than 512x512 on any given cell. You break the cells into quads and those quads into quads, and those quads into quads, etc. until you reach full resolution. Then the hard-part is paging those in and out. Real memory becomes a cache for tiles loaded off disk. Now you can pull any given section rapidly. The primary advantage of tiling is that it allows you to combine multiple things all tiled off the same zone. This is extremely common for imagery related to terrain as terrain elevation can be tiled as well as imagery, perhaps as well as soil, or vegetation, or other layers of information. Each layer of information may have a different size, but be tiled the same. Elevation could be 64x64 while satellite imagery 512x512, while soil types are 32x32 and vegetation 64x64. Tiling is common for two sources together, and more common the more layers you have to use together. It is very difficult and often expensive (performance wise) not to tile multiple layers. Another method is through windowed compression. This is probably the easiest, though depending on the data source not always as good looking. ECW free version limits your images to 500M which is within your limits. A GNU license or commercial license will buy you unlimited sizes (limited by your hardware of course). ECW and Jpeg2000 are wavelet compression which is very easy to window. You can then store the entire image on disk as compressed wavelet information, and extract the "window" of the visible portions of the image. ECW and Jpeg 2000[^] Tiling textures[^] Image Clipmapping[^]

                D Offline
                D Offline
                Dan Neely
                wrote on last edited by
                #7

                El Corazon wrote:

                "display" is relative to your display, which theoretically is probably maxing out at 2560x1600 assuming a very nice monitor.

                He could be working with super premium type monitors used for medical imaging, etc. I know those can reach at least 8 megapixels.

                -- If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.

                E 1 Reply Last reply
                0
                • D Dan Neely

                  El Corazon wrote:

                  "display" is relative to your display, which theoretically is probably maxing out at 2560x1600 assuming a very nice monitor.

                  He could be working with super premium type monitors used for medical imaging, etc. I know those can reach at least 8 megapixels.

                  -- If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.

                  E Offline
                  E Offline
                  El Corazon
                  wrote on last edited by
                  #8

                  dan neely wrote:

                  used for medical imaging, etc. I know those can reach at least 8 megapixels.

                  If I recall those max out at 3500x3500 monichrome or about 10+ megapixels. Okay, even assuming that monitor, the task is still the same. I regularly show full scale NASA blue marble next gen earth images, http://earthobservatory.nasa.gov/Newsroom/BlueMarble/BlueMarble_monthlies.html[^] at 86400x43200 for the 500m per pixel version. No matter what monitor you have, you can't show that image. We do have one live-camera that takes 4096x3072 images, we display it on a group of monitors. Even with that, you might have to partition the image live on each monitor so that you can see it on multiple computers. Once you have the partitioning technique down, you can do live displays of any resolution on any monitor, or group of monitors. There are similar techniques for volumetric medical imaging, though no mention of that has been made here. The concept is still the same. Massive data is needed to view in zoom mode at full resolution, nothing held back. But zoomed out you can get away with a bit less data (no pun intended).

                  _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                  1 Reply Last reply
                  0
                  • K King Tran

                    i want to display an image which is over 400M size by the following ways: 1) GDI+ 2)OPenGL (load the image as texture) but it dosn't work, since i can display little size image by these two methods, is there size limit to display so big image? thanks

                    J Offline
                    J Offline
                    Jheriko
                    wrote on last edited by
                    #9

                    GDI+ is probably too naive to handle the image size on its own, or much too slow. There is no reason why it couldn't deal with it, in theory. OpenGL is limited by your texture memory. No textures bigger than the texture memory can be loaded. You will want to load the file into memory (regular) and split it up, swapping out sections as needed. Setting up a texture in OpenGL moves data from RAM to VRAM and freeing the texture id will release it from VRAM so that you have space to load another etc... 4GB of RAM (page file) should be plenty enough for a 400M image. This kind of resolution is enormous, if you are going to put it all on screen at once I would recommend downsizing it first, i.e. pre-build files which are downsized, otherwise you will have the same memory problems, not to mention the ugly aliasing effects. Hope this helps.

                    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