mrfangzheng

Hope and fear are useless. Be confident, and always be prepared for the worst.
  首页  :: 新随笔  :: 联系 :: 管理

WPF : Imaging

Posted on 2009-09-24 11:43  mrfangzheng  阅读(191)  评论(0编辑  收藏  举报
  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);