WPF : Imaging

  1. BitmapSource
  2. BitmapFrame
    BitmapSource image5 = BitmapSource.Create( width, height, 96, 96, PixelFormats.Indexed1, BitmapPalettes.WebPalette, pixels, stride);
    FileStream stream5 = new FileStream("palette.tif", FileMode.Create);
    TiffBitmapEncoder encoder5 = new TiffBitmapEncoder();
    encoder5.Frames.Add(BitmapFrame.Create(image5));
    encoder5.Save(stream5);

你可能感兴趣的:(WPF)