I have a few apps that show the product picture in forms and even in 
reports. There are thousands of pictures, so this is how I do it:

a) store all pictures in a separate directory, for instance: 
c:\myapp\pictures
b) the picture should weigh no more than 500 kb, so your screen would 
refresh quickly. However, larger sizes are ok. In my case, most pictures 
weigh less than 100 kb
c) All pictures are JPG
d) The picture name should have a unique association with the product 
code, for instance:

      product code 123456
      picture code  123456.jpg

e) you put an image control on your form and this is the code you should 
use to show the pictures

    ** in a navigate method of the form

     local cCode,cPath

      cPath =  "c:\myapp\pictures\pictures\" && this is the folder where 
your pictures are stored

     cCode = products.code && pick up the product code from the cursor 
or table (products.dbf), as you navigate it

      thisform.image1.picture = cPath + alltrim(cCode) + ".jpg"

  ** the above would result in this string:

thisform.image1.picture = "c:\myapp\pictures\pictures\123456.jpg"
thisform.refresh

In the above manner, as you navigate your products table, you can show 
the product's picture in the form.
And because the JPG files are stored directly on the disk folder, 
rendering is very fast.

DO NOT MAKE THE MISTAKE OF EVER STORING PICTURES IN A GENERAL FIELD. The 
file would grow enormously and it would be extremely slow to show the 
pictures.

Hope this helps

Rafael Copquin


El 15/05/2010 0:56, Gary Jeurink escribió:
> I started out 8-years ago with a plant/garden database to keep track of
> plant/source, care, cost, location and so on. I have a general field to
> store one 4 x 4 jpg photo of each. Now I want to log about 1,000 plus
> photo's and sort them by date/plant/location.
>
> 1. be able to call a slide show per plant.
>     a. by time of year to show seasonal changes
>     b. year by year to show growth
> 2. call up a slide show per vender
> 3. map our garden and list plants per location
>
> As someone told me earlier, I should keep the photo's in jpg files and track
> them by file name.
> What strategy would any of you recommend.
>
> Gary Jeurink
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
>    text/plain (text body -- kept)
>    text/html
> ---
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to