CompuServe Messages

Windows Pallette blues

    28-May-95 23:20:18
Fm: david W. mennenoh 71561,2343
To: David A. Dooley 73340,2454
Rich, Here's my standard procedure for putting together a palette for use in a toolbook app. What you need to do is either get a common palette for every image/flc in your app or switch to black between images so you don't see the palette change when the new image is loaded. The best way though is to have every image use the same palette – this can be done by section with the right app. To generate a custom palette for a group of images is very easy if you've got 3DS and animator pro. 1. Put all the images in a seperate directory. This isn't totally necessary but it makes creating an .IFL for 3ds easier. TO make an ifl you can type DIR /b >name.ifl You'll need to edit it, as it will put name.ifl as one of the entries in the .ifl. If you've got images and animations in different directories you'll have to make an .ifl that contains the path names too. 2. Once your .ifl is created go into 3DS and in the KF set the number of frames to the number of images you've got in the .ifl. Set your .ifl as the background method and render to a .flc with medium palette enabled. Leave tile on for the background. This will give you a .flc with the right palette. Watch out – depending on how many images you've got this can be a huge .flc. 3. Go into animator pro and load the .flc. Set the total frames to 1 so you chop off everything. Now you've got a 1 frame .flc with an optimized palette. Next make your current cluster contain the entire palette – all 256 colors. And then do a VGRAD/HGRAD fill with pic\apply ink. This will fill the screen with all of the colors in the palette. 4. Back in palette mode do a squeeze and set it to 236 colors. THis will leave 20 black entries at the end of the palette. If you want to make a true windows palette you need to have 10 blacks at the beginning and 10 blacks at the end as windows reserves those entries for itself. 5. Now save your .flc as a .bmp. I always name it pal.bmp. Since you're using Tbook you can use bit edit and paledit to read in the .bmp and create an identity palette for it. This will shift the palette 10 entries up and give you the ideal windows palette for your images. That's all there is too it. There are some more steps you'll need to go through if you want to reapply that palette back to all of your images. And there is a nice little utility on C$ somewhere that lets you do it fairly easily. If you need it let me know. Hope this helps some. Once you do it a couple of times you'll find that it's really pretty easy and efficient. DM