Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
General Field in HTM table.
Message
General information
Forum:
Visual FoxPro
Category:
ActiveVFP
Miscellaneous
Thread ID:
00878063
Message ID:
00878127
Views:
16
Is it in a bitmap(.bmp)? If it is, you may need to convert from bitmap to jpeg or gif before displaying in the browser. Then you can either refer to the file on disk or send it directly using the Response object headers.
Here are some genral guidelines for extracting the picture from a General field:
Go to the record number of a table that you would like the associated BMP image exported to.
Copy the general field (Name "Picture") of the record to a temporary file (Name "Temp"). So the newly created Temp.dbf file contains one general field "Picture" and one record only. The syntax for this follows:
COPY TO temp FIELDS picture NEXT 1
Execute the following code, assuming the file name for the output BMP image is "Test.Bmp":
*** Open two files, "temp.fpt" contains the physical BMP data.
*** and Create a file handle for the output file "Test.Bmp"
handlein=FOPEN("temp.fpt")
handleout=FCREATE("test.bmp")
*** To determine the length of the Input file "Temp.fpt"
gnEnd = FSEEK(handlein, 0, 2)
gnTop = FSEEK(handlein, 0)
*** Store the whole file into a string "str1"
str1 = FREAD(handlein, gnEnd)
*** Offset 599 bytes from Str1 and save it to "str2"
str2=RIGHT(str1,LEN(str1)-599)
*** Write "Str2" into the BMP file "Test.BMP"
n=FWRITE(handleout,str2)
*** Close both opened files
=FCLOSE(handlein)
=FCLOSE(handleout)


>Hello claude
>helpme please.
>
>I have building a Intranet website based.
>this is a school student management system,
>using ActiveVFP.
>
>I need to put the stundent photo in the
>student info page....
>
>how to make to do this?
>
>Thanks,,,very thanks!!!!
Previous
Reply
Map
View

Click here to load this message in the networking platform