예제 #1
0
        public static Bitmap GetStatic(int index, int hue, bool onlyHueGrayPixels, out bool patched, bool checkmaxid)
        {
            try
            {
                var orig = GetStatic(index, out patched);

                if (orig == null)
                {
                    return(null);
                }

                var image = new Bitmap(orig);

                HueData.ApplyTo(image, hue, onlyHueGrayPixels);

                return(image);
            }
            catch (Exception e)
            {
                patched = false;

                if (Core.Debug)
                {
                    Console.WriteLine($"[Ultima]: ArtData.GetStatic({nameof(index)}:{index}, {nameof(hue)}:{hue}, {nameof(onlyHueGrayPixels)}:{onlyHueGrayPixels}, ...)\n{e}");
                }

                return(null);
            }
        }
예제 #2
0
        public static Bitmap GetGump(int index, int hue, bool onlyHueGrayPixels)
        {
            try
            {
                var orig = GetGump(index);

                if (orig == null)
                {
                    return(null);
                }

                var image = new Bitmap(orig);

                HueData.ApplyTo(image, hue, onlyHueGrayPixels);

                return(image);
            }
            catch (Exception e)
            {
                if (Core.Debug)
                {
                    Console.WriteLine($"[Ultima]: GumpData.GetGump({nameof(index)}:{index}, {nameof(hue)}:{hue}, {nameof(onlyHueGrayPixels)}:{onlyHueGrayPixels})\n{e}");
                }

                return(null);
            }
        }
예제 #3
0
        public static Bitmap GetStatic(int index, int hue, bool onlyHueGrayPixels, out bool patched, bool checkmaxid)
        {
            Bitmap image = new Bitmap(GetStatic(index, out patched));

            HueData.ApplyTo(image, hue, onlyHueGrayPixels);

            return(image);
        }
예제 #4
0
        public static Bitmap GetGump(int index, int hue, bool onlyHueGrayPixels, out bool patched)
        {
            Bitmap image = new Bitmap(GetGump(index, out patched));

            HueData.ApplyTo(image, hue, onlyHueGrayPixels);

            return image;
        }
예제 #5
0
 public void ApplyTo(Bitmap bmp, bool onlyHueGrayPixels)
 {
     HueData.ApplyTo(bmp, Colors, onlyHueGrayPixels);
 }