Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Petr Sterba
  Where is Petr Sterba?
 Zlin
 Czech Republic
 Petr Sterba
 To: Jamie Osborn
  Where is Jamie Osborn?
 Melbourne
 Australia
 Jamie Osborn
 Tags
Subject: RE: How export general field (image) to graphic...
Thread ID: 33452 Message ID: 33599 # Views: 1 # Ratings: 0
Version: Visual FoxPro 7 Category: Active X Controls & OLE Automation
Date: Sunday, November 30, 2003 12:04:12 AM         
   


> > Hello,
> > please help me...
> >
> > I have table with two fields ID (char) and DIA (general, image). For example ID = 017-24 and DIA = image.
> > I want export field DIA to separate graphical file as 017-24.jpg or 017-24.bmp etc. For all records.
> >
> > Thank you very much
> >
> > Best regards
> >
> > StealthX
>
> Storing images in tables is not a good idea IMO. Espcially compressed formats like .JPG as Fox also stores a BMP copy of the image for preview purposes and thus a lot of room is wasted. It's also fiddly to do what you want to do.
>
> I always store the path to images instead of the image but if you really want to store the image why not do it in a memo field as binary data. eg.
>
> *-- Put in image
> CREATE TABLE images ;
> 	( id C(6), ;
> 	mImgFile M NOCPTRANS )
> APPEND BLANK
> REPLACE mImgFile WITH FILETOSTR("c:\images\myimg.jpg")
> 
> *-- TO get the image(s) back out
> mypath = "c:\savedir\"
> SELECT images
> SCAN
>   STRTOFILE(mImgFile,mypath + id )
> ENDSCAN
> 

> Cheers,
> Jamie
> jamie.osborn@foxite.com

Thank you very much, but how convert data field GENERAL to MEMO BINARY? Is it possible or impossible?

Bye

Peter


ENTIRE THREAD

How export general field (image) to graphical file Posted by Petr Sterba @ 11/27/2003 12:05:40 AM
RE: How export general field (image) to graphic... Posted by Jamie Osborn @ 11/27/2003 3:03:24 AM
RE: How export general field (image) to graphic... Posted by Petr Sterba @ 11/30/2003 12:04:12 AM
RE: How export general field (image) to graphic... Posted by Eric den Doop @ 11/30/2003 5:07:55 PM