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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What to Do to use picture under jpg

Status
Not open for further replies.

satendra1972

Programmer
Aug 9, 2001
1
IN
Sir/MAM
I am recently developing a Package named as "Fabric Management System" for my company while using Foxpro2.6 under Windows. I had to show the sample fabric color while
in my programme. I had created a Master database with name Color.dbf having field code,description, style & opening balances. Once i niput all the data. I have to use the same dbf for Fabric Studio. I just want to know how to input picture under jpg format in a dbf. My Foxpro is not accepting type "Picture" while creating a dbf.
Is there any programming method to convert jpg file to bmp as foxpro does not support jpg. I hope for quick help
on to my mail satendra_kam@yahoo.com

Regards,
Satendra
 
You will probably have to find a utility somewhere that does this either batch mode or from within the program by using a RUN command when you are adding the picture file as there is nothing native to FoxPro that can do that. Or you will have to use OLE and a 3rd party viewer of some sort to display the picture programmatically if you don't convert it.

Try something like this:


Dave S.
 
I would hate to see the spped of your application after severl hundred JPG file were added to a memo/general field.
I agree with DSumm, Make a field in your database called filename.
Create a sub-Directory under you application root called images.
use the run command or windows API calls to start a viewer program
David W. Grewe
Dave@internationalbid.com
 
Satendra,
I've had a lot of experience in OLE objects & Fox2.6. For your best manipulation under images, I highly reccomend converting the images from a .JPG to .BMP format. It becomes far easier in fox to deal with them. In addition, I reccomend coming up with a "Standard" for your images. Figure exactly how big your image will be when displayed (in pixels, such as 200x300 pixels). Then, using something like Photoshop, adjust all of the images so that they are the exact same size. This will help keep file sizes to a minimum, and image quality no greater/lesser than is absolutely required.
Also, Genereal fields can be a little flaky. I reccomend capturing any "OLE Fields corrupt" type messages, and actually discarding them. My experience has shown that they are erroneous, and will actually CAUSE problems. You may, on a rare occasion actually have a corruption, but they are drastically reduced when ignoring them in general.
Please let me know if this helps.
-Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top