How to make thumbnail images...

How to make thumbnail images...

Post by K. Wilde » Sat, 07 Jun 2003 04:10:17


Is there a VB 6 API or a separate component that allows
image conversion?

I want to batch process an entire folder of .jpg, or .gif
images and create specified sized thumbnails of the
images and retain the large original image.

Example:  I start out with this...
image1.jpg  36KB
image2.jpg  35KB
image3.jpg  35KB
(etc)

After I run the batch process on the folder containing
these images, I get something like this...

image1.jpg  36KB
image1_small.jpg  4KB
image2.jpg  35KB
image2_small.jpg  4KB
image3.jpg  35KB
image3_small.jpg  4KB
(etc)

Is there a component or program that can do this from VB
6, not .Net?

I would be willing to write the code if I knew it was
possible with VB 6 accessible components.

Any help would be appreciated.

Thanks,

King Wilder

 
 
 

How to make thumbnail images...

Post by Mike D Sutto » Sat, 07 Jun 2003 10:38:38


Quote:> Is there a VB 6 API or a separate component that allows
> image conversion?

> I want to batch process an entire folder of .jpg, or .gif
> images and create specified sized thumbnails of the
> images and retain the large original image.
<snip>
> Is there a component or program that can do this from VB
> 6, not .Net?

> I would be willing to write the code if I knew it was
> possible with VB 6 accessible components.

There's two problems here, first up you need to load the original image and
scale it down to a thumbnail.
I couldn't find a really good old post of mine on the subject, but here's
one that does a reasonable job:
http://groups.google.com/groups?selm=eC%24lb53yCHA.2232%40TK2MSFTNGP09
If that's no good I have an old project that used to be on my old site,
demonstrating creating of thumbnails.

The second problem is saving as a .jpg.  If you think that .bmp would be
acceptable then you can simply call the SavePicture() method (Or even write
your own Bitmap output routines which would give you more control over the
output.)
If you really do want .jpg output then you'll have a bit more of a job on
your and you'll need to look into a third party solution to help you out.
Here's an old post with a bunch of libraries in:
http://groups.google.co.uk/groups?selm=%23dm7SPBDDHA.2044%40TK2MSFTNG...
You could also use GDI+ if you want to dig into that one, it's another thing
to redistribute though.

In case you need it, here's how to create the command line application side
of things.  Remove the form's from your project, add a new module and add
the method:

'***
Private Sub Main()
    ' ...
End Sub
'***

This will now be your application start point, and you can process the
command line with the Command$() function.
Hope this helps,

    Mike

 - Microsoft Visual Basic MVP -

WWW: Http://www.mvps.org/EDais/

 
 
 

1. HELP: Making thumbnail images

I was wondering if a tool like PMBPLUS could be used to take an
image file, read it in, figure out its x and y resolution, and
then "scale it down" to fit a greatly reduced "thumbnail" version,
and output that as a new file.

Like this:

   makethumb original_image percentage > thumbnail_image

where percentage would be the "scaling factor" and "thumbnail_image"
is the output file from the stdout.

Is there a utility like this that works on UNIX that can handle TIFF,
GIF, EPS, PICT, etc, etc, etc.?

2. SceneGraph problems

3. Looking for a program that makes a large image from thumbnails

4. New graphics site

5. App for making thumbnail index images?

6. How to insert your info in any image...

7. Making thumbnails with Intel Image Processing Library

8. WTB: portable CD player

9. help with making a thumbnail of a postscript file for a browser

10. Index (thumbnail) making programs

11. Making Thumbnails?

12. PSP 7.0 "making thumbnails"

13. making thumbnails