<delect id="sj01t"></delect>
  1. <em id="sj01t"><label id="sj01t"></label></em>
  2. <div id="sj01t"></div>
    1. <em id="sj01t"></em>

            <div id="sj01t"></div>

            系統架構設計師輔導:處理圖像

            時間:2024-09-30 11:38:40 系統架構師 我要投稿
            • 相關推薦

            系統架構設計師輔導:處理圖像

              如果您的應用程序顯示大量圖像文件(例如,.jpg 和 .gif 文件),則您可以通過以位圖格式預先呈現圖像來顯著改善顯示性能。要使用該技術,請首先從文件中加載圖像,然后使用 PARGB 格式將其呈現為位圖。下面的代碼示例從磁盤中加載文件,然后使用該類將圖像呈現為預乘的、Alpha 混合 RGB 格式。例如:

            系統架構設計師輔導:處理圖像

              [C#]

              if ( image != null && image is Bitmap )

              {

              Bitmap bm = (Bitmap)image;

              Bitmap newImage = new Bitmap( bm.Width, bm.Height,

              System.Drawing.Imaging.PixelFormat.Format32bppPArgb );

              using ( Graphics g = Graphics.FromImage( newImage ) )

              {

              g.DrawImage( bm, new Rectangle( 0,0, bm.Width, bm.Height ) );

              }

              image = newImage;

              }

              [Visual Basic .NET]

              If Not(image Is Nothing) AndAlso (TypeOf image Is Bitmap) Then

              Dim bm As Bitmap = CType(image, Bitmap)

              Dim newImage As New Bitmap(bm.Width, bm.Height, _

              System.Drawing.Imaging.PixelFormat.Format32bppPArgb)

              Using g As Graphics = Graphics.FromImage(newImage)

              g.DrawImage(bm, New Rectangle(0, 0, bm.Width, bm.Height))

              End Using

              image = newImage

              End If

            【系統架構設計師輔導:處理圖像】相關文章:

            系統架構設計師要素01-11

            系統架構設計師考試之路01-11

            系統架構設計師考試報考條件12-30

            系統架構設計師考試報考指南06-19

            系統架構設計師:優化顯示速度01-11

            系統架構設計師:考慮用戶的觀點01-11

            系統架構設計師考試試題舉例10-22

            系統架構設計師:性能調整和診斷01-11

            優秀系統架構設計師需要具備的條件01-02

            <delect id="sj01t"></delect>
            1. <em id="sj01t"><label id="sj01t"></label></em>
            2. <div id="sj01t"></div>
              1. <em id="sj01t"></em>

                      <div id="sj01t"></div>
                      黄色视频在线观看