Radegast.SLImageHandler.DisplayPartialImage C# (CSharp) Method

DisplayPartialImage() public method

public DisplayPartialImage ( AssetTexture assetTexture ) : void
assetTexture AssetTexture
return void
        void DisplayPartialImage(AssetTexture assetTexture)
        {
            if (InvokeRequired)
            {
                if (IsHandleCreated || !instance.MonoRuntime)
                    BeginInvoke(new MethodInvoker(() => DisplayPartialImage(assetTexture)));
                return;
            }

            try
            {
                ManagedImage tmp;
                System.Drawing.Image img;
                if (OpenJPEG.DecodeToImage(assetTexture.AssetData, out tmp, out img))
                {
                    pictureBox1.Image = img;
                    pictureBox1.Enabled = true;
                }
            }
            catch (Exception) { }
        }