TipH1212


NewDeal Hot Tip 1212

NewDraw

Dither Bitmaps to IBM Standard Palette

When importing a bitmap image into NewDeal, you will get best results if your graphics file uses the IBM standard 16-color or 256-color palette.

If your image uses a different palette, we recommend dithering the image to the IBM standard palette before you import it. To do so, you must use a graphics program outside NewDeal. There are many programs that can perform this function. Here are step by step instructions for several of them.

Paint Shop Pro

  1. First, you need a palette file for Paint Shop Pro. Create a graphic in NewDraw. A simple black rectangle will do. Export the rectangle to GIF format or PCX format by choosing File, Export Graphic. When you export it, if you choose 256-color (8-bit) format, the resulting file will contain the IBM standard 256-color palette. If you choose 16-color (4-bit) format, the resulting file will contain the IBM standard 16-color palette.
  2. In Paint Shop Pro, open the GIF or PCX file you created in the first step. From the Colors menu in Paint Shop Pro, choose Save Palette. Give the palette file a name. You can use this palette file from now on to dither any images you wish to import into NewDeal. You might want to create both a 16-color palette file and a 256-color palette file.
  3. Now dither the image. In Paint Shop Pro, open the image you intend to import. Click Load Palette in the Colors menu. Select the palette file you created in the second step. Make sure that Error Diffusion Dithering is selected in the Load Palette dialog box.
  4. After applying the palette, save the image. If you click Save in the File menu, the new dithered image will replace the original. More likely you will want to choose Save As and save the image under another name to preserve the original file.

Adobe Photoshop

  1. First, you need to create a palette file for Photoshop. Create a graphic in NewDraw. A simple black rectangle will do. Export the rectangle to BMP format by choosing File, Export Graphic. When you export it, if you choose 256-color (8-bit) format, the resulting file will contain the IBM standard 256-color palette. If you choose 16-color (4-bit) color, the resulting file will contain the IBM standard 16-color palette.
  2. Next, open that BMP file in Photoshop and click Image, Mode, Color Table, Save. Save the file and name it something like IBM256.ACT (or IBM16.ACT if it is a 16-color palette file). You can use this same palette file in the future any time you want to dither an image to the IBM standard palette. You might want to create both a 16-color palette file and a 256-color palette file.
  3. In Photoshop, open the file you wish to dither and apply the color palette by clicking Image, Mode, Indexed Color… in the dialog select Palette Custom and leave Dither set to Diffusion. Chose OK. The palette dialog appears. Chose Load. Load the IBM256.ACT file created earlier and click OK.
  4. Now that the palette is applied, save the image in PCX or BMP format for importing into NewDraw. You may wish to use Save As to preserve the original file.

PICLAB 1.83

PicLab is a freeware, command line graphics tool that will convert (dither) 256 color GIF graphics to 16 colors, using the GEOS palette. PicLab is available for download from the NewDeal web site, in the DOS Utilities section.

  1. First, PicLab works only with GIF format, so if the bitmap image you wish to import is not in GIF format, you must convert it to GIF format. To do this, you can use Graphic Workshop, a shareware graphics viewer and converter, or you can use any other graphics conversion program that you have.
  2. For our example below, let’s say the graphic is named PRETTY.GIF and you put the graphic in C:\GIF.
  3. PICLAB resides in C:\PICLAB. Also in C:\PICLAB is a palette file named GEO16.MAP, which is a simple text file that contains the following 16 lines (those are all zeros, not letter o):
    0 0 0
    0 0 170
    0 170 0
    0 170 170
    170 0 0
    170 0 170
    170 85 0
    170 170 170
    85 85 85
    85 85 255
    85 255 85
    85 255 255
    255 85 85
    255 85 255
    255 255 85
    255 255 255

    Note: This is the palette file for the 16-color IBM standard palette. For the values to create a 256-color IBM standard palette file, see technical support document 247 (Color Printing).

  4. Launch PICLAB. At the PICLAB prompt, enter the following commands:

    • SET PICDIR C:\GIF (sets the default directory for PicLab)
    • GDIR (displays a list of the GIF files in \GIF)
    • GLOAD PRETTY (loads PRETTY.GIF into memory)
    • UNMAP (prepares PRETTY.GIF for applying a new palette)
    • SET PALETTE 16 (or 256 if you are dithering to 256 colors)
    • PLOAD GEO16 (loads the GEO16.MAP file into memory)
    • MAP (applies the loaded palette file)
    • GSAVE PRETTYN.GIF (save the new, dithered image)That’s it. Now import PRETTYN.GIF into NewDeal.

    5. That’s it. Now import PRETTYN.GIF into NewDeal.


Last Modified 18 Oct 1999
©2000 NewDeal Inc. All rights reserved


BlankHomeBlank
Eine Seite zurück

Die Kommentarfunktion ist geschlossen.