コード例 #1
0
        /// <summary>Saves the image to the specified stream.</summary>
        /// <param name="stream">The stream.</param>
        /// <param name="type">The type.</param>
        /// <param name="quality">The quality.</param>
        /// <exception cref="NotImplementedException"></exception>
        public override void Save(Stream stream, ImageType type = ImageType.Png, int quality = 100)
        {
            switch (type)
            {
            case ImageType.Jpeg: bitmap.Save(stream, SKEncodedImageFormat.Jpeg, quality); break;

            case ImageType.Png: bitmap.Save(stream, SKEncodedImageFormat.Png, quality); break;

            default: throw new NotImplementedException();
            }
        }