ScriptSpot

Script

Bitmap2Maxscript Convertor

By jaijinsunrise · Credited author: Andru Phoenix · 2010-06-17

Version
2.0
Version requirement
Max 9+
Date updated
2010-06-16
Votes
9
Downloads

Tags: Bitmap Convertor Compressor

Description

Converts bitmaps to MaxScript using LZ compression and copies the resulting code to the clipboard (Max2010+) or listener window(Max9+). Works best on files with redundant colors like icons. Use it to add graphics to your scripts while minimizing file-size. Based on a script example found in the help files. In some scenarios this algorithm yields up to 800% smaller file sizes over the original script. I might add a GUI to this later on.

Enjoy. Instructions:

1. Run script
2. Select image to convert
3. Paste resulting code into your script

 Note: See example file for usage. This script can be CPU intensive and could take some time to compile images larger than 200x200. It is recommended that you open the listener window before running the script to view progress in realtime.

Comments (5)

Garp · 2010-06-18

This is one brilliant idea!

solozar · 2010-06-18

I can that that I do not so. But after start of a script waited for 20 minutes and no result. At start sample the message emerges: Tipe error: Call needs function or class. got: undefined.

JokerMartini · 2010-06-17

Great script man. Very useful!

solozar · 2010-06-17

The given script does not work correctly. At its start the program hangs. Test silt on Мах 2009/2011

jaijinsunrise · 2010-06-17

Solozar,

Sorry you had issues. With big images with alot of colors the script will take a while to do it's thing as the conversion process is CPU intensive. If you want an indication of what it's doing when it's "hanging", open the listener window before running the script. I'll write a GUI soon with a progress bar to ease the confusion.

I haven't tested it in 2009 but I made some tweaks to it this morning to address some incompatible functions with max 9.

-Dru