2 Replies Latest reply: Nov 22, 2012 9:19 AM by fabsav RSS

    preload images. is it possible?

    fabsav
      Hi!
      i'm wondering if is it possibile to "preload" an image.

      Supposing to have lot of high detailed images that change fast, i would like to show a low quality of the same picture and than "continue to fill" with the missing pixel. (like google maps when zooming)
      This is because actually I have to use a placeholder while the image is loading, but it's not nice at all!

      Any idea??

      thank you a lot!

      ps: i cant load 2 different images!
        • 1. Re: preload images. is it possible?
          MiPa
          You could try to use an interlaced image (http://en.wikipedia.org/wiki/Interlace_%28bitmaps%29) but I am not sure whether JavaFX supports that. If not, you might want to file a feature request in JIRA. When you save an image for the web in Photoshop you can specify interlacing as an option for the compression.

          Otherwise you will have to use two images, as you have mentioned already, with differen sizes and switch between these images once the bigger one was loaded completely.
          • 2. Re: preload images. is it possible?
            fabsav
            mmm... need to investigate :D tnx!