From: "Earl F. Glynn" Subject: Re: Converting 256 Color Bitmaps to monochrome (D4) Date: Thursday, May 18, 2000 4:30 PM "Andreas Vossloh" wrote in message news:3924593C.E815B12@kiup.de... > how can I convert 256 color bitmaps (which are definitly black an white > - only 255 and 0 values in the file) to monochrome (1-bit-per-pixel) > bitmap. I want to save memory in my paradox-blob. Just setting the PixelFormat to pf1bit will change the scanlines, but your palette is likely wrong. Yes, pf1bit bitmaps have a palette. This seems to work in defining a black/white palette: procedure TForm1.Button1Click(Sender: TObject); VAR Bitmap: TBitmap; Palette: TMaxLogPalette; BEGIN Palette.palVersion := $300; Palette.palNumEntries := 2; WITH Palette.palPalEntry[0] DO BEGIN peRed := 0; peGreen := 0; peBlue := 0; peFlags := 0 END; WITH Palette.palPalEntry[1] DO BEGIN peRed := 255; peGreen := 255; peBlue := 255; peFlags := 0 END; Bitmap := TBitmap.Create; TRY Bitmap.LoadFromFile('BlackWhite.BMP'); Bitmap.Palette := CreatePalette(pLogPalette(@Palette)^); Bitmap.PixelFormat := pf1bit; Bitmap.SavetoFile('NewBlackWhite.BMP'); Image1.Picture.Graphic := Bitmap FINALLY Bitmap.Free END end; -- efg Earl F. Glynn Overland Park, KS USA efg's Computer Lab: http://www.efg2.com/Lab