Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Thumbnail generator

Status
Not open for further replies.

GriffMG

Programmer
Mar 4, 2002
6,305
FR
Has anyone seen or written a VFP thumbnail generator?

I'm trying to add a photo gallery to one of my apps and I think that being able to generate thumbnails of the photos to display on a form while the user scrolls down a grid would be helpful.

I've found a free program with a command line interface that I could 'run' as the photos are added to the database (and no I'm not planning to store them in memo fields! B-) ) - but I've largely been able to do away with the accompanying dos style windows and I would like not to do it that way.

Any suggestions gratefully received!

Martin

Regards

Griff
Keep [Smile]ing
 
You can use WIA (Windows Image Asquisition) To create a thumbnail.
Code:
LOCAL img,IP
Img = CreateObject("WIA.ImageFile")
IP = CreateObject("WIA.ImageProcess") 
Img.LoadFile("C:\WINDOWS\Web\Wallpaper\Bliss.bmp")
IP.Filters.Add(IP.FilterInfos("Scale").FilterID) )
IP.Filters(1).Properties("MaximumWidth") = 100  
IP.Filters(1).Properties("MaximumHeight") = 100 
Img = IP.Apply(Img) Img.SaveFile("C:\WINDOWS\Web\Wallpaper\BlissThumb.bmp")

You can also use GDI+

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Mike,

That looks very simple - are there any gotchas on this? Does everyone have WIA?

Regards

Griff
Keep [Smile]ing
 
Regretably, the app is in VFP 6 so the GDI option is probably out

B-)

Regards

Griff
Keep [Smile]ing
 
Hi All,

Many thanks for all your suggestions, I've opted for a 3rd party approach.


Pretty inexpensive, very fast indeed. Simple to get started with.

I have no idea how difficult it will be to distibute and support - but that is all part of the fun.

Martin
B-)

Regards

Griff
Keep [Smile]ing
 
Griff,

Have you had any problems with ImageViewer?

Regards

Bryan
 
Hi Bryan,

Thus far I have had no problems at all with the ImageViewer, it is easy to use, easy to code and a doddle to deploy to remote sites (I incorporate a free table within my apps into which I can stash binary files - and then write them out to disk at runtime).

Today, it is running on half a dozen web servers constantly looking for jpg files and making thumbnails of site photos for about 30 construction projects. In addition, although this feature is not widely used, there are about 200 copies of the the same ImageViewer installed on my thick-client app doing the same thing.

Not one single, solitary grumble from anyone.

That is quite a score in my book, particularly as it costs pennies.

Have you tried it?

Regards

Griff
Keep [Smile]ing
 
Hello Grif,

Yes I have. I have a number of problems with it as I am trying to use more features than you. They are currently revising their code to better accomplish some of the advertised features.

One other problem I have is using the control on a 'background' invisible form to gather image information - EXIF details etc. In some instances the control still appears even though the form has been released().

Is it possible for us to communicate off forum?

Regards

Bryan
 
Yes.

martin dot griffin at finedata dot com

Regards

Griff
Keep [Smile]ing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top