Merge remote-tracking branch 'origin/6.2.1' into 7.1.4

This commit is contained in:
Shannon
2014-05-23 10:00:34 +10:00

View File

@@ -33,9 +33,12 @@ namespace umbraco.editorControls.imagecropper
//This get's the IFileSystem's path based on the URL (i.e. /media/blah/blah.jpg )
Path = _fs.GetRelativePath(relativePath);
image = Image.FromStream(_fs.OpenFile(Path));
Name = _fs.GetFileName(Path);
var fileName = _fs.GetFileName(Path);
Name = fileName.Substring(0, fileName.LastIndexOf('.'));
DateStamp = _fs.GetLastModified(Path).Date;
Width = image.Width;
Height = image.Height;
@@ -75,12 +78,10 @@ namespace umbraco.editorControls.imagecropper
{
crop = preset.Fit(this);
}
var tmpName = Name.Substring(0, Name.LastIndexOf('.'));
ImageTransform.Execute(
Path,
String.Format("{0}_{1}", tmpName, preset.Name),
String.Format("{0}_{1}", Name, preset.Name),
crop.X,
crop.Y,
crop.X2 - crop.X,