Thumbnails

J

JJ

I have a gallery-like application. (The gallery will be actually presented
in Flash, but the management (cms) of the images will be in asp.net. )

My question is, is it ok to create Thumbnail images on the fly by resizing
the original sending it to the output stream (i.e. Response.ContentType =
"image/jpeg"; Response.BinaryWrite(imageContent) ), or best to actually save
the thumbnails to disk.

Would this method result in a much slower displaying of thumbnails?

Keep in mind that several thumbnails will be displayed on one page (in
flash, but not sure if thats relevent).

I am trying to avoid the headache of saving thumbnails and managing their
deletion etc.

JJ
 
M

Mark Rae [MVP]

I can't see how sending to the output stream can be slower than rendering
files. When you point url to a file, someone on the server site will need
to open the file an put the content in the http response.

I believe the OP was asking whether the extra overhead in creating the
thumbnails on the fly as and when they are needed would be significant
enough to make it worth actually storing the thumbnails themselves as
separate JPEGs on the server's file system, especially since Flash is
involved...

I'm afraid I don't know the answer...
 
J

JJ

I guess I am comparing the creation of a (high quality) thumbnail each time,
against opening a pre-created file of the same size.
I don't _think_ the flash will change things here. It could just as well be
a browser accessing the files. Flash will just be given the urls (whether
that is a handler url or an actual file url is the question). It sounds as
though there isn't any obvious rule saying that using one or the other is
much slower...

A handler removes the headache of trying to manage thumbnails, but would it
be ok to server say 40 images to a single web page. I would have thought so,
but wonder if there is a bottleneck of any sorts here?

JJ
 
D

Dave Bush

You could server side cache the results and reduce the number of times
you actually create the thumbs. But, there will be a performance hit
(although I doubt anyone will really see it) when it does create the
thumb.

-----Original Message-----
From: JJ [mailto:[email protected]]
Posted At: Thursday, November 01, 2007 5:44 AM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Thumbnails
Subject: Thumbnails

I have a gallery-like application. (The gallery will be actually
presented
in Flash, but the management (cms) of the images will be in asp.net. )

My question is, is it ok to create Thumbnail images on the fly by
resizing
the original sending it to the output stream (i.e. Response.ContentType
=
"image/jpeg"; Response.BinaryWrite(imageContent) ), or best to actually
save
the thumbnails to disk.

Would this method result in a much slower displaying of thumbnails?

Keep in mind that several thumbnails will be displayed on one page (in
flash, but not sure if thats relevent).

I am trying to avoid the headache of saving thumbnails and managing
their
deletion etc.

JJ
 
L

Lloyd Sheen

JJ said:
I have a gallery-like application. (The gallery will be actually presented
in Flash, but the management (cms) of the images will be in asp.net. )

My question is, is it ok to create Thumbnail images on the fly by resizing
the original sending it to the output stream (i.e. Response.ContentType =
"image/jpeg"; Response.BinaryWrite(imageContent) ), or best to actually
save the thumbnails to disk.

Would this method result in a much slower displaying of thumbnails?

Keep in mind that several thumbnails will be displayed on one page (in
flash, but not sure if thats relevent).

I am trying to avoid the headache of saving thumbnails and managing their
deletion etc.

JJ

I did an app which allowed browsing of a folder of subfolders of images.
The pages presented showed dynamically created thumbnails.

The app would check to see if a subfolder named thumbs existed and if not
would then create the folder and required thumbnails on the go. If the
subfolder existed it would only create thumbnails for those files which were
new and did not have corresponding thumbnails. All the overhead of creating
the folder, the thumbnails was only noticed when a user would ask for a page
size of 20 to 30. Numbers under that were not noticable and number above
that were slow enough that the overhead was not a factor.

LS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top