Commit 2dcbe432 by liulongfei
parents c2bb96cf fcdf418f
......@@ -213,7 +213,7 @@ namespace VIZ.Package.Module
public async Task<fileUploadResult> CreateCutImageFile(Bitmap bitmap, string fileName)
{
string requestUri = string.Format("{0}UplodFile?filePath={1}", ApplicationDomainEx.MediaConfig.Url, this.Support.SelectedFolderModel.Path + "\\");
string requestUri = string.Format("{0}UplodFile?filePath={1}&isResize=false", ApplicationDomainEx.MediaConfig.Url, this.Support.SelectedFolderModel.Path + "\\");
fileUploadResult upLoadResult = await MediaResourceFileService.PostCutImage<fileUploadResult>(requestUri, bitmap, fileName);
......
......@@ -894,13 +894,24 @@ namespace VIZ.Package.Module
private async void EditImage()
{
try
{
if (selectedFileModel == null || selectedFileModel.ThumbnailBitmap == null) return;
ImageEditWindow imageEditWindow = new ImageEditWindow();
ImageEditViewModel vm = imageEditWindow.ImageCut.DataContext as ImageEditViewModel;
vm.OriginImage = vm.BitmapToBitmapImage(selectedFileModel.ThumbnailBitmap);
string url = string.Format("{0}GetFile?filePath={1}&isResize=false", ApplicationDomainEx.MediaConfig.Url, SelectedFileModel.Path);
var imageResult = await MediaResourceFileService.GetImage(url);
Image img = Image.FromStream(imageResult);
Bitmap bmp = new Bitmap(img);
vm.OriginImage = vm.BitmapToBitmapImage(bmp);
imageEditWindow.ShowDialog();
......@@ -938,6 +949,11 @@ namespace VIZ.Package.Module
}
}
}
catch (Exception ex)
{
log.Error(ex.Message);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment