ARCed.Helpers.Cache.Panorama C# (CSharp) Method

Panorama() public static method

Loads/recalls a cached panorama file and returns it
public static Panorama ( string filename, int hue, int opacity = 255 ) : Image
filename string Full path of the panorama graphic
hue int Hue rotation to apply to graphic, with 360 degrees of displacement
opacity int Opacity of the returned _srcTexture
return Image
        public static Image Panorama(string filename, int hue = 0, int opacity = 255)
        {
            var bitmap = LoadBitmap(@"Graphics\Panoramas", filename);
            if (bitmap == null)
                return null;
            using (Image image = new Bitmap(bitmap))
            {
                if (hue != 0)
                    RotateHue(image, hue);
                if (opacity != 255)
                    ChangeOpacity(image, opacity);
                GC.Collect(GC.GetGeneration(image), GCCollectionMode.Forced);
                return new Bitmap(image);
            }
        }