예제 #1
0
        public static Stream SaveAsStream(this IPictureWriter target, IPicture picture)
        {
            if (target == null)
            {
                return(null);
            }

            var bytes = target.SaveAsBytes(picture);

            return(new MemoryStream(bytes));
        }
예제 #2
0
        public static string SaveAsBase64(this IPictureWriter target, IPicture picture)
        {
            if (target == null)
            {
                return(null);
            }

            var bytes = target.SaveAsBytes(picture);

            return(Convert.ToBase64String(bytes));
        }