예제 #1
0
 private static PhotoEntity CreatePhoto(IHttpFile httpFile, PlaceEntity place)
 {
     return(new PhotoEntity
     {
         Title = httpFile.FileName,
         Image = httpFile.Data,
         ImageType = ImageMimeTypeConverter.ToImageType(httpFile.ContentType),
         Place = place
     });
 }
예제 #2
0
        public static Image Create(byte[] data, string mimeType)
        {
            ImageType type = ImageMimeTypeConverter.ToImageType(mimeType);

            return(new Image(data, type));
        }