private void LoadPhotoImage(IPhotoImage photoImage) { PhotoEntity photo = CreatePhotoFromPhotoImage(photoImage); _loadedBytes += photo.Image.Length; _loadedPhotos.Add(photo); }
private PhotoEntity CreatePhotoFromPhotoImage(IPhotoImage photoImage) { return(new PhotoEntity { Title = new FileInfo(photoImage.Path).Name, CreationDate = photoImage.CreationDate, AlbumId = _album.Id, PlaceId = _album.Place.Id, Image = photoImage.Image, ImageType = ImageTypeRecognizer.Recognize(photoImage.Image) }); }