Version Française English Version [ Lingo Scripts for Macromedia Director ]  

Last Updates Last Updates
 
Xtras Xtras
o
o
o
o
o
3D-UDI
BinFileIO
Joystick
SetMouseLoc
PointInside...
 
Shockwave Demo Shockwave
 o
o
o
o
Jeu de la Vie
Arbre
The Legend of Zelda
Zelda Breakout
 
3D Lingo Lingo 3D
 o
o
o
o
Model Highlighter
Text On Screen
Text To Texture
Animated Texture
 
3D Lingo Lingo
 o


Save an image to disk
 
3D Lingo Pogopixels - Widgets, Flash and Web Applications

How to save an image object to disk

Download the script with the two functions (1 Ko)

These two functions allows saving an image to disk from Lingo. The first function saves the image as a Portable PixMap (PPM) file: this generates a very large file but the advantage is that the script requires only the FileIO Xtra, which is provided with Director.

The second function saves the image as a BMP file using the BinFileIO Xtra. Although it's necessary to have this additional Xtra, the advantage is that the generated file is far smaller than a PPM file.

To use these functions, just pass the image object and the name of the file as parameters. For example:

saveImageAsPPM(member("bitmapMember").image, the moviePath & "image.ppm")
saveImageAsBMP(sprite(1).image, the moviePath & "image.bmp")


23/05/2003 - counter