dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: Firefox image tearing

  1. #1
    Join Date
    Mar 2005
    Location
    CA
    Posts
    323

    Firefox image tearing

    I'm running a script which essentially does little more than swap images. The script moves the image over to where it will be displayed before swapping the images. This means that until the time that the thumbnail is completely within the area of the div containing the main image there is some overlap of images.

    My problem is that when I run the script in Firefox it is slow and shows image tearing, whereas in Internet Explorer it runs smoothly (one thing Microsoft did better?). Is there anything I should look out for as far as optimization goes when I'm dealing with moving images and such?

    You can observe a working example of the script Here. Thank you for any help.

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    I see no difference. Which browser versions are you using?

  3. #3
    Join Date
    Mar 2005
    Location
    CA
    Posts
    323
    Fang, thank you for the reply!

    I am using the most updated version of both browsers (1.02 for Firefox? just updated two days ago, and 6 for IE).

    Both have been updated two days ago, though they both ran with this difference before updates.

    Possibly it is my machines? I have tested it on three different computers with nearly the same results, Firefox runs at the same speed but shows image tearing on the image. (The part that is within the other image moves at a different speed than the part outside the image).

    A better example would be here

    where the images are rather large files as compared to the ones you are looking at.

    ******************Added 03/30/05 4:39 PM PST**************
    I would also like to note that this problem is most likely stemming from the way images are loaded in FX as opposed to IE, as well as the way they are displayed...which makes it much less a Javascript problem than a simple "do I really want to make it do this?" question. However, having worked with Javascript for only about 4-5 months I am sure there are ways of streamlining my code quite a bit.

    Also, please forgive the lack of a direct link to my script source earlier, sometimes I forget when I use external files...
    script source
    *******************************************************

    Thanks again!
    Last edited by acorbelli; 03-30-2005 at 07:40 PM. Reason: appending notes

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    I see it now.
    The thumbnails are very large images, use small thumbnails, then do the image swap when in position to large images.
    The extension '.thm' could also be a source of the problem, use jpg.

  5. #5
    Join Date
    Mar 2005
    Location
    CA
    Posts
    323
    Quote Originally Posted by Fang
    I see it now.
    The thumbnails are very large images, use small thumbnails, then do the image swap when in position to large images.
    The extension '.thm' could also be a source of the problem, use jpg.
    I'll try to make my php scripts create smaller thumbnails (I turned the resolution on them way down for the script) and see if that helps. As for the .thm, it should display fine since the file itself is a jpeg image just renamed with that extension to mark it as a thumbnail. Which means it shouldn't be a problem....however I'll look into changing it and see how that goes.

    Thank you for your help!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles