/    Sign up×
Community /Pin to ProfileBookmark

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 [URL=http://imagestation.hermitshut.com/index.php?ref=s]Here[/URL]. Thank you for any help.

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@FangMar 30.2005 — I see no difference. Which browser versions are you using?
Copy linkTweet thisAlerts:
@acorbelliauthorMar 30.2005 — 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 [URL=http://imagestation.hermitshut.com/index.php?ref=wesmounas.html]here[/URL]

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...

[URL=http://hermitshut.com/ImageStation/scripts/ImageScripts.js]script source[/URL]

*******************************************************

Thanks again!
Copy linkTweet thisAlerts:
@FangMar 31.2005 — 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.
Copy linkTweet thisAlerts:
@acorbelliauthorMar 31.2005 — 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.[/QUOTE]


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!
×

Success!

Help @acorbelli spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...