Storing thumbnails

  • Thread starter Thread starter oeyvind toft
  • Start date Start date
O

oeyvind toft

I`m writing an image browser and wonder how to store
thumbnails in a single file (ala Paint Shop Pro) so that they
dont have to be recreated each time a folder is opened.

Any ideas?

Oeyvind
 
I first off recommend just re-creating them every-time. If you do the
generation
properly you can thumbnail up to 120 images per minute at relatively decent size
(128x128).
Those numbers came off of my slow web server machine, so I'm sure you can
thumbnail
even faster.

Depending on how you are displaying them though, thumbnailing might hang your
UI. That
can be bad. Throw your thumbnailing off to a thread so you don't have to worry
about your
application being bogged down.

If you still want to store thumbs, then try using the BinaryFormatter and
tossing them in as byte[]'s.

I'm in the process of writing an article on just this concept, the idea of a
fully functional image browser,
and I'm code complete, just not article complete. If you are interested, I'll
probably post something
on the www.windowsforms.net/Forums in the Code Samples section detailing each of
the neat parts
before the full article is done.
 
Thanks a lot for you reply Justin.

I have already written a browser that re-create the thumbnails. It works
just fine, displaying the thumbnails relatively fast, depending on the size
of the
original image.

However, I like the PSP speed of displaying thumbnails, it looks more
elegant too.

Why do you recommend re-creating? Any special reason?

As I`m not very familiar with the binary formatter, do you have any
links to tuts/articles discussing similar problems?

Oeyvind

(I`ll keep an eye on the code samples section, eagerly awaiting your
articles. Also. it would be great to see your browser in action !!!)

--
http://home.online.no/~oeyvtoft/ToftWeb/
Justin Rogers said:
I first off recommend just re-creating them every-time. If you do the
generation
properly you can thumbnail up to 120 images per minute at relatively decent size
(128x128).
Those numbers came off of my slow web server machine, so I'm sure you can
thumbnail
even faster.

Depending on how you are displaying them though, thumbnailing might hang your
UI. That
can be bad. Throw your thumbnailing off to a thread so you don't have to worry
about your
application being bogged down. http://home.online.no/~oeyvtoft/ToftWeb/html/frameset/3d.htm
http://home.online.no/~oeyvtoft/ToftWeb/html/frameset/flash.htm




If you still want to store thumbs, then try using the BinaryFormatter and
tossing them in as byte[]'s.

I'm in the process of writing an article on just this concept, the idea of a
fully functional image browser,
and I'm code complete, just not article complete. If you are interested, I'll
probably post something
on the www.windowsforms.net/Forums in the Code Samples section detailing each of
the neat parts
before the full article is done.

--
Justin Rogers
DigiTec Web Consultants, LLC.

oeyvind toft said:
I`m writing an image browser and wonder how to store
thumbnails in a single file (ala Paint Shop Pro) so that they
dont have to be recreated each time a folder is opened.

Any ideas?

Oeyvind
 
Okay, make sure that at run-time you do an in-memory cache. That way when
the user comes back to the images they do display super fast. Also, you can do
predictive thumbnailing in the background while the program is running. Just
make
a background thread or use the ThreadPool and thumbnail pictures that the user
isn't
even looking at yet.

Why do I recommend recreating? Well, I posted some reasons on here:
http://weblogs.asp.net/justin_rogers/archive/2004/01/18/60018.aspx

I'm putting the image browser on relatively high priority I think. There are a
couple pieces
I want to add, like web service support or remote albums. I have this concept
for a thumbnailed
view of a remote album that you can then slideshow. When you activate the
slideshow it does a
background download of the remaining images so you don't have any lag-time. If
your slideshow
has a 5 second wait between switching this is plenty enough time to download a
relatively large
Jpeg.

--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers

oeyvind toft said:
Thanks a lot for you reply Justin.

I have already written a browser that re-create the thumbnails. It works
just fine, displaying the thumbnails relatively fast, depending on the size
of the
original image.

However, I like the PSP speed of displaying thumbnails, it looks more
elegant too.

Why do you recommend re-creating? Any special reason?

As I`m not very familiar with the binary formatter, do you have any
links to tuts/articles discussing similar problems?

Oeyvind

(I`ll keep an eye on the code samples section, eagerly awaiting your
articles. Also. it would be great to see your browser in action !!!)

--
http://home.online.no/~oeyvtoft/ToftWeb/
Justin Rogers said:
I first off recommend just re-creating them every-time. If you do the
generation
properly you can thumbnail up to 120 images per minute at relatively decent size
(128x128).
Those numbers came off of my slow web server machine, so I'm sure you can
thumbnail
even faster.

Depending on how you are displaying them though, thumbnailing might hang your
UI. That
can be bad. Throw your thumbnailing off to a thread so you don't have to worry
about your
application being bogged down. http://home.online.no/~oeyvtoft/ToftWeb/html/frameset/3d.htm
http://home.online.no/~oeyvtoft/ToftWeb/html/frameset/flash.htm




If you still want to store thumbs, then try using the BinaryFormatter and
tossing them in as byte[]'s.

I'm in the process of writing an article on just this concept, the idea of a
fully functional image browser,
and I'm code complete, just not article complete. If you are interested, I'll
probably post something
on the www.windowsforms.net/Forums in the Code Samples section detailing each of
the neat parts
before the full article is done.

--
Justin Rogers
DigiTec Web Consultants, LLC.

oeyvind toft said:
I`m writing an image browser and wonder how to store
thumbnails in a single file (ala Paint Shop Pro) so that they
dont have to be recreated each time a folder is opened.

Any ideas?

Oeyvind
 
Thanks Justin.

I really appreciate your thorough input.

Hope one day to see your browser in action... =O)

regards,

Oeyvind

--
http://home.online.no/~oeyvtoft/ToftWeb/
http://home.online.no/~oeyvtoft/ToftWeb/html/frameset/3d.htm
http://home.online.no/~oeyvtoft/ToftWeb/html/frameset/flash.htm



Justin Rogers said:
Okay, make sure that at run-time you do an in-memory cache. That way when
the user comes back to the images they do display super fast. Also, you can do
predictive thumbnailing in the background while the program is running. Just
make
a background thread or use the ThreadPool and thumbnail pictures that the user
isn't
even looking at yet.

Why do I recommend recreating? Well, I posted some reasons on here:
http://weblogs.asp.net/justin_rogers/archive/2004/01/18/60018.aspx

I'm putting the image browser on relatively high priority I think. There are a
couple pieces
I want to add, like web service support or remote albums. I have this concept
for a thumbnailed
view of a remote album that you can then slideshow. When you activate the
slideshow it does a
background download of the remaining images so you don't have any lag-time. If
your slideshow
has a 5 second wait between switching this is plenty enough time to download a
relatively large
Jpeg.

--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers

oeyvind toft said:
Thanks a lot for you reply Justin.

I have already written a browser that re-create the thumbnails. It works
just fine, displaying the thumbnails relatively fast, depending on the size
of the
original image.

However, I like the PSP speed of displaying thumbnails, it looks more
elegant too.

Why do you recommend re-creating? Any special reason?

As I`m not very familiar with the binary formatter, do you have any
links to tuts/articles discussing similar problems?

Oeyvind

(I`ll keep an eye on the code samples section, eagerly awaiting your
articles. Also. it would be great to see your browser in action !!!)

--
http://home.online.no/~oeyvtoft/ToftWeb/
Justin Rogers said:
I first off recommend just re-creating them every-time. If you do the
generation
properly you can thumbnail up to 120 images per minute at relatively decent size
(128x128).
Those numbers came off of my slow web server machine, so I'm sure you can
thumbnail
even faster.

Depending on how you are displaying them though, thumbnailing might
hang
your
UI. That
can be bad. Throw your thumbnailing off to a thread so you don't have
to
worry
about your
application being bogged down. http://home.online.no/~oeyvtoft/ToftWeb/html/frameset/3d.htm
http://home.online.no/~oeyvtoft/ToftWeb/html/frameset/flash.htm




If you still want to store thumbs, then try using the BinaryFormatter and
tossing them in as byte[]'s.

I'm in the process of writing an article on just this concept, the
idea of
a
fully functional image browser,
and I'm code complete, just not article complete. If you are
interested,
I'll
probably post something
on the www.windowsforms.net/Forums in the Code Samples section
detailing
each of
the neat parts
before the full article is done.

--
Justin Rogers
DigiTec Web Consultants, LLC.

I`m writing an image browser and wonder how to store
thumbnails in a single file (ala Paint Shop Pro) so that they
dont have to be recreated each time a folder is opened.

Any ideas?

Oeyvind
 
Back
Top