473,385 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to load image faster?

Hello,

I have several images that need to be loaded dynamically based on user
interaction. Each image size is about 6000x1500 pixels. I see several
sites they make the image blur, blur, blur, and the image become
clear. I want to know how to do this, or maybe you all have other
solutions better than this. Can anyone give me some suggestions and
the way how to implement?

Thanks
Chamnap

Jul 10 '07 #1
11 3680

"Chamnap" <ch***********@gmail.comwrote in message
news:11**********************@e16g2000pri.googlegr oups.com...
Hello,

I have several images that need to be loaded dynamically based on user
interaction. Each image size is about 6000x1500 pixels. I see several
Yikes. Are you sure you want to present images that size in one chunk?
sites they make the image blur, blur, blur, and the image become
No, they make the image grow, grow, grow on zooming in and shrink, shrink,
shrink on zooming out.
clear. I want to know how to do this, or maybe you all have other
solutions better than this. Can anyone give me some suggestions and
the way how to implement?
When the user clicks the "zoom in" button (or clicks an area of the image),
you preload the larger image and set an interval to enlarge the image a few
pixels at a time until it reaches the size of the larger image. Hopefully,
by that time, the larger image is cached and changing the src of the now
blurry original will magically sharpen it. If not, the effect is less
pleasing.

None of this has anything to do with making the image load faster, though
you can create perceived speed by preloading the larger image on page load.
Jul 10 '07 #2
Chamnap wrote:
Hello,

I have several images that need to be loaded dynamically based on user
interaction. Each image size is about 6000x1500 pixels. I see several
sites they make the image blur, blur, blur, and the image become
clear. I want to know how to do this, or maybe you all have other
solutions better than this. Can anyone give me some suggestions and
the way how to implement?

Thanks
Chamnap
No sure, but it may be because the images are stored interleaved..you
download successively higher res detail as time goes by.

However why you are using such big images when few computers will
display them in that size beats me..

why not resize them|?

Photoshop/photopaint is your friend.
Jul 10 '07 #3
The Natural Philosopher wrote on 10 jul 2007 in comp.lang.javascript:
Chamnap wrote:
>Hello,

I have several images that need to be loaded dynamically based on user
interaction. Each image size is about 6000x1500 pixels. I see several
sites they make the image blur, blur, blur, and the image become
clear. I want to know how to do this, or maybe you all have other
solutions better than this. Can anyone give me some suggestions and
the way how to implement?

Thanks
Chamnap
No sure, but it may be because the images are stored interleaved..you
download successively higher res detail as time goes by.

However why you are using such big images when few computers will
display them in that size beats me..

why not resize them|?
I agree
Photoshop/photopaint is your friend.
Irfanview will do it nicely while you keep your money in your pocket.

<http://www.irfanview.net/>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 10 '07 #4
When the user clicks the "zoom in" button (or clicks an area of the image),
you preload the larger image and set an interval to enlarge the image a few
pixels at a time until it reaches the size of the larger image. Hopefully,
by that time, the larger image is cached and changing the src of the now
blurry original will magically sharpen it. If not, the effect is less
pleasing.
David Mark, can you show me how to implement this?

Chamnap

Jul 11 '07 #5

"Chamnap" <ch***********@gmail.comwrote in message
news:11**********************@g37g2000prf.googlegr oups.com...
>When the user clicks the "zoom in" button (or clicks an area of the
image),
you preload the larger image and set an interval to enlarge the image a
few
pixels at a time until it reaches the size of the larger image.
Hopefully,
by that time, the larger image is cached and changing the src of the now
blurry original will magically sharpen it. If not, the effect is less
pleasing.

David Mark, can you show me how to implement this?
Yes, but you will have to do all the work as I can't give you the code I am
referring to and I don't know of any public examples to point you to. Start
with an image tag and a couple of links. As I mentioned, clicking the "zoom
in" link must preload the larger image and set an interval to enlarge the
original. It follows that you must set the original's overflow style to
auto (or hidden if you use a custom scrolling interface, but never mind that
at the moment.) I assume you know how to swap the image src when it reaches
the required dimensions. I also assume you understand that you must
preserve the aspect ratio of the image when sizing it. If I am wrong in
either of these assumptions, you aren't ready to write such an interface and
should explore alternate solutions (like breaking up the images.)

Let me know if you run into trouble...
>
Chamnap

Jul 11 '07 #6
Hi, David

I just find the web that has this functionality
http://picasaweb.google.co.uk/lh/sea...c=G&filter=1#0
Can you show me the way how to implement it?
Thanks
Chamnap

Jul 19 '07 #7

"Chamnap" <ch***********@gmail.comwrote in message
news:11*********************@e9g2000prf.googlegrou ps.com...
Hi, David

I just find the web that has this functionality
http://picasaweb.google.co.uk/lh/sea...c=G&filter=1#0
Can you show me the way how to implement it?
That is a watered-down version of what I described before (doesn't have the
incremental zoom effect.) What part are you unclear about? It's an image
in a container (DIV most likely) that has its overflow style set to hidden.
When you click "zoom" it changes the size of the image. I suspect they are
using the onload event of a hidden image to update the source of the
original, which is not a good idea. I tried it in Opera (which doesn't
support onload for images properly) and sure enough I got this message:

"You are using a browser that is not fully supported. Some features may not
work too well, but you are welcome to have a look around."

They used a browser sniff to come to that conclusion (of course) and the
rest of the page was completely blank. (!) Google's JS developers are
absolutely awful. Whatever you do, don't take a page out of their book.
Jul 19 '07 #8
ASM
En réponse à David Mark qui nous a susurré, en date du : 19/07/07 4:39,
le message sibyllin suivant :
"Chamnap" <ch***********@gmail.comwrote in message
news:11*********************@e9g2000prf.googlegrou ps.com...
>Hi, David

I just find the web that has this functionality
http://picasaweb.google.co.uk/lh/sea...c=G&filter=1#0
Can you show me the way how to implement it?

I tried it in Opera (which doesn't
support onload for images properly)
really ?

<img src="asm1.gif" onload="alert(this.width+'\n'+this.height)" alt="" >

works fine in my Opera 9.0

--
Stephane Moriaux et son (moins) vieux Mac
Jul 19 '07 #9
Hi,

The part I don't know how to implement is: when they load the big
image or due to the Internet connection speed, it seems they load the
low-quality images first and when ready replace with the high-quality
image. How can they realize when to load low-quality and when to load
the high-quality when the Internet connection speed is high enough?
Thanks
Chamnap
Jul 20 '07 #10

"Chamnap" <ch***********@gmail.comwrote in message
news:11**********************@x35g2000prf.googlegr oups.com...
Hi,

The part I don't know how to implement is: when they load the big
image or due to the Internet connection speed, it seems they load the
low-quality images first and when ready replace with the high-quality
image. How can they realize when to load low-quality and when to load
the high-quality when the Internet connection speed is high enough?
You lost me. Please quote the context of your reply. If I recall, the
example you posted loaded a small image first, regardless of connection
speed and then loaded a larger one when "zoom in" was clicked. Right?
Jul 20 '07 #11
David Mark wrote:
"Chamnap" <ch***********@gmail.comwrote in message
news:11**********************@x35g2000prf.googlegr oups.com...
>Hi,

The part I don't know how to implement is: when they load the big
image or due to the Internet connection speed, it seems they load the
low-quality images first and when ready replace with the high-quality
image. How can they realize when to load low-quality and when to load
the high-quality when the Internet connection speed is high enough?

You lost me. Please quote the context of your reply. If I recall, the
example you posted loaded a small image first, regardless of connection
speed and then loaded a larger one when "zoom in" was clicked. Right?
This sounds like the difference between interlaced and non-interlaced
images. One downloads as if it were blurry, blurry, blurry, then fine.
The other appears in chunks, top-down.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
Jul 21 '07 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jason Garland \(Secure Access Pty Ltd\) | last post by:
Is there a way to preload the MS compondents of the Dot Net Framework V1.1 Before user login ? We have a few programs that are created under VB Dot Net that run at user login. On the older...
1
by: Gianluca_Venezia | last post by:
I'm developing an application and I'm testing it. There is a strange new thing, happened today (and only in one of two pc I'm using as test). In PCs with runtime, opening mde file, and before...
10
by: GeekBoy | last post by:
Okay, I have two identical web servers running Windows 2003 web server. I have an ASP.NET application which runs great on one of them. Dedicated IP address, behind our firewall, etc. Everyone's...
8
by: TM | last post by:
I have a small application that displays records from an access mdb into two datagrids and am looking to see if it is possible to speedup the loadtime somehow. In my formload I am filling my...
4
by: www.MessageMazes.com | last post by:
Greetings, I'm working on a collection of free puzzle pages that serve as a feed to sale pages. My question is whether I can specify that some images load before others? If you visit...
4
by: jordi_ramis | last post by:
Hi, I'm currently using image.fromfile to load jpg images in my application. I've noted that this procedure is very slow compared to some aplications I have seen. Is there any way to load a jpeg...
2
elamberdor
by: elamberdor | last post by:
Hi All! Well, i'm modifying a dynamic map, with lat and long datapoints, my problem is it loads in text perfectly onto exact points I specify on the map, ..well now I want to load in...
4
by: Annalyzer | last post by:
Is there any way to make this site load faster? I'm pre-loading the slide-show images into an array, the biggest one is 80KB and still it takes a few seconds before the first image becomes visible....
13
by: rdudejr | last post by:
Hi all, I hardly ever make a post unless I am having a very purplexing issue, so this one should be good... I am trying to do a load against a database on an AIX server into a DB2 v9.1...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.