Ejemplo n.º 1
0
 /// <summary>
 /// Instanciate a new ImageAdapter object using the specified file containing the Bitmap
 /// </summary>
 /// <param name="bitmapFileName">The file containing the Bitmap to use in the Adapter</param>
 public ImageAdapter(string bitmapFileName)
 {
     using (Bitmap bmp = ImageUtility.GetUnlockedBitmap(bitmapFileName))
     {
         InternalConstructor(bmp);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Load an image as IImageAdapterUnmananged
 /// </summary>
 /// <param name="fileName">File name of the image to be loaded</param>
 void IImageAdapterUnmanaged.Load(
     string fileName)
 {
     using (Bitmap bmp = ImageUtility.GetUnlockedBitmap(fileName))
     {
         InternalConstructor(bmp);
     }
 }
Ejemplo n.º 3
0
        private Bitmap GetBitmapFile(string bitmapName)
        {
            if (_keys.Count == 0)
            {
                throw new ApplicationException("You need to call LoadPackage before trying to access it");
            }
            if (_keys.Contains(MASTERBMP) == false)
            {
                return(null);
            }
            int index = _keys.IndexOf(MASTERBMP);

            return(ImageUtility.GetUnlockedBitmap(_keys[index].ToString()));
        }