Beispiel #1
0
        /// <summary>
        /// Decodes the image for given filepath.
        /// </summary>
        /// <param name="filepath">Filepath to the WebP image.</param>
        /// <returns>An image</returns>
        public NSImage Decode(string filepath)
        {
            NSError error  = null;
            var     result = _decoder.ImageWithWebP(filepath, out error);

            if (error != null)
            {
                throw new NSErrorException(error);
            }
            return(result);
        }
Beispiel #2
0
 /// <summary>
 /// Decodes the image for given filepath.
 /// </summary>
 /// <param name="filepath">Filepath to the WebP image.</param>
 /// <returns>An image</returns>
 public UIImage Decode(string filepath)
 {
     return(_decoder.ImageWithWebP(filepath));
 }