Log in

View Full Version : import/export bitmap in pascal



danboy88
05-06-2007, 10:58 PM
System: Windows XP, Celeron 2.8GHz, nVidia GeForce 3
Compiler/IDE: Turbo Pascal 7
API: none

Hi!

I'm trying to import an image (bitmap) into a program (made in T Pascal 7) using TP7 and, after I edit it with the program I made, to export/save it back to a bitmap file. I don't know how to do this two things. I suppose I need to use an unit or something.

Thanks in advance!

godbeast
06-06-2007, 12:18 AM
1) leave TP7 and jump to Free Pascal (http://www.freepascal.org) - it is crossplatform and 98% compatible with TP
2) what kind of bitmap? 8/16/32? This is a good "unit" (http://imaginglib.sourceforge.net/index.php?page=about) for such stuff.

If you still want TP7, jump to Programmer's heaven (http://www.programmersheaven.com/zone24/mh38.htm), there are tons of bitmap processing units for TP7.

However, if you want to program games, choose any good api or library (like Phoenix for 2D games, SDL, OpenGl etc.) and checkout articles and forums on this site :D

DarknessX
06-06-2007, 12:49 AM
Indeed, lose TP7. Its old and outdated. Use freepascal from http://freepascal.org... MOST of your code should work (and .tpu units won't, however) and if it doesn't, FreePascal (FPC) has available switches to switch to TP7 mode. So, all in all, a better bet. You could use Jedi-SDL for displaying bmp's, or the link godbeast gave you.