3 Replies Latest reply on Apr 28, 2010 5:08 AM by Karl_Sigiscar_1971

    How do I load an jpeg progressively incrementing resolution

    fapm84

      Hello there flex coders!

      I trying to load a high resolution image (JPEG from a DICOM Object) using URLStream and a bytearray,  I found a code that loads the image progressively but it's loads from beginning to end (up to down). I just wondering if there's a way to load the complete image from the lowest resolution to highest, in other words, the very first stream loads the whole image in low resolution and the next ones higher and higher until it reaches the maximum resolution.

       

      I hope you can help me

       

      Best regards,

      Franco.

        • 1. Re: How do I load an jpeg progressively incrementing resolution
          David_F57 Level 5

          hi,

           

          This could be done mainly at the backend, for instance if you have server based (gd for php) graphics manipulation you could request an image @25% then @50% etc as each level completes it replaces the the first. The issue I see with this is if you use more than a couple of progressions you are really wasting a lot of time and bandwidth, a highly compressed jpg at say 50% size then the full sized, full quailty (to reasonable constrains, say 1024x768) usually works ok for this sort of thing.

           

          Another way which I have used is to have 2 images already on the server large_thumb/full, I load the thumb and it shows  pixelated but as soon as the next quality level arrives I use a fade effect to replace the thumb.

           

          David.

          1 person found this helpful
          • 2. Re: How do I load an jpeg progressively incrementing resolution
            fapm84 Level 1

            Thanks for your answer David!

             

            If anybody got more ideas about this, please share it with us.

            Thanks.

            • 3. Re: How do I load an jpeg progressively incrementing resolution
              Karl_Sigiscar_1971 Level 3

              At each level, the image would be tiled horizontally and vertically as sections.

               

               

              First level: lowest resolution, one tile

              Second level: higher resolution level 2, four tiles

              Third level: higher resolution level 3, sixteen tiles

              ....

               

              If the user can scroll around in the image, then you will need to download images corresponding to the other tiles at the same level, progressively, as the user drags the mouse around.