main logo
Subject: Re: General Fields -- Pics
Author: Larry Bradley
Posted: 2002/03/01 09:39:06
 
View Entire Thread
New Search


Lynette, in one of my apps I have a pageframe with an image control for pictures. The student file has the name of a file containing all the pictures that are applicable to the student (there can be multiple pictures for a student; there is a control on the page frame that allows the selection of the proper pictue.

The refresh() method of the pageframe has the following code:

SELECT (thisform.oPicture.cAlias)
IF EMPTY(PictureFile)
this.StudentImage.visible=.f.
else
this.StudentImage.Picture = picturefile
this.StudentImage.visible = .t.
endif

where PICTUREFILE is the name of the field in the picture table, oPicture is the picture bizobj and this.studentimage is the image control.

The image control is set up to stretch the image in an isometric fashion, so that the picture fits the image control.

The easiest way to handle the thumbnail is with two images. The other way is to have a small image control for the thumbnail, then resize it if the user wants a larger picture. But that still entails loading the entire picture, and then resizing it to a thumbnail. I'd use two pictures.

Larry

<i><font color="#663300">I have done something really stupid and need to find a way to quickly reverse it!

I created a general field and a form that lets the staff embed an image... bad move... We now have a table that's over 130 megs (about 120 pics --- each embedded graphic is over 1 meg!) So now I need to quickly change the way we do that....

I want to store the file name in a text box and have the form open the file in an olebound control only if needed. I seem to have a problem processing how this works within VFP.... An example would help me, I haven't found one that makes sense to me yet!

Also, staff would like to automatically see a thumbnail, not necessarily the ful size pic... and of course I don't want to go there having 2 sizes of the photo or the overhead on the form load to resize each photo to get the thumbnail.

Any one have any ideas on a simple way to handle this? It's been a nightmare so far and I'm only on generation 2!!!

Lynette</font></i>

Larry Bradley (lhbradley At igs .DO.T net)
FoxPro Developer
Ottawa, Canada
 
©2002 Larry Bradley
<-- Prior Message New Search Next Message -->