Esempio n. 1
0
 public void RenderTo(ref Image[] images, NexonPalFile palette)
 {
     images = new Image[Count];
     for (int i = 0; i < Count; i++)
     {
         images[i] = frames[i].Render(palette);
     }
 }
Esempio n. 2
0
            public unsafe Bitmap Render(NexonPalFile palette)
            {
                Bitmap     bitmap     = new Bitmap(Bounds.Width, Bounds.Height, PixelFormat.Format32bppArgb);
                BitmapData bitmapData = bitmap.LockBits(Bounds, ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
                int *      ptr        = (int *)(void *)bitmapData.Scan0;

                for (int i = 0; i < Data.Length; i++)
                {
                    byte b = Data[i];
                    if (b != 0)
                    {
                        ptr[i] = palette[b];
                    }
                }
                bitmap.UnlockBits(bitmapData);
                return(bitmap);
            }