コード例 #1
0
ファイル: DemoBase.cs プロジェクト: lingliy/HtmlRenderer
        public static Image LoadBitmap(string filename)
        {
            System.Drawing.Bitmap gdiBmp = new System.Drawing.Bitmap(filename);
            DemoBitmap            bmp    = new DemoBitmap(gdiBmp.Width, gdiBmp.Height, gdiBmp);

            return(bmp);
        }
コード例 #2
0
        void contentMx_ImageLoadingRequest(object sender, LayoutFarm.ContentManagers.ImageRequestEventArgs e)
        {
            //load resource -- sync or async?
            string absolutePath = documentRootPath + "\\" + e.ImagSource;

            if (!System.IO.File.Exists(absolutePath))
            {
                return;
            }
            //load
            System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(absolutePath);
            e.SetResultImage(DemoBitmap.CreateFromGdiPlusBitmap(bmp));
        }
コード例 #3
0
ファイル: DemoBase.cs プロジェクト: prepare/HTML-Renderer
 public static Image LoadBitmap(string filename)
 {
     System.Drawing.Bitmap gdiBmp = new System.Drawing.Bitmap(filename);
     DemoBitmap bmp = new DemoBitmap(gdiBmp.Width, gdiBmp.Height, gdiBmp);
     return bmp;
 }