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

Converting images to BMPs programmatically 1

Status
Not open for further replies.

Mike Lewis

Programmer
Jan 10, 2003
17,516
Scotland
Here's something that might be of interest.

I sometimes need to convert GIFs and JPEGs to BMPs. I've always used a utility like Paintshop Pro to do that. But I've just realised you can do it quite easily in VFP:

Code:
loPic = LOADPICTURE("MyImage.GIF")
SAVEPICTURE(loPic, "MyImage.BMP")

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
That is a keeper

I compleated in the last few months a project where I had to aquire a utility and set up scripts to convert formats. It was a complicated process making fast deployment almost impossiable.

As always thanks for passing that along.

Steve Bowman
Independent Technology, Inc.
CA, USA
 
Steve,

Glad this is of use.

Keep in mind that it will only convert to BMPs. It doesn't serve as a all-purpose conversion routine.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
good note, however I have come to find that things like imbeding images into pdf's and the like they come out much better if the source is bmp so it would be at least for me the direction I would go most offten.

Steve Bowman
Independent Technology, Inc.
CA, USA
 
Whilst we're talking of odd ways of using Fox - I demonstrated the new rotating polypoints in VFP 9 last week and was challenged to program the Asteroids game in Fox. Should be quite straightforward: one triangular ship and lots of polygonal asteroids.

Geoff Franklin
 
Mike that's quite useful!

It will also read from .jpg or a .bmp and save to a .gif or a .jpg - very useful



Regards

Griff
Keep [Smile]ing
 
Scrub that - the file saved is identical (i.e. .bmp) and it's XP that is recognising the format.

Still useful!

Thanks Mike

Regards

Griff
Keep [Smile]ing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top