/// <summary> /// /// </summary> /// <param name="imageFileName"></param> /// <param name="imageBytes"></param> /// <param name="objectID"></param> /// <param name="imageType"></param> /// <returns></returns> public static string SaveRawTypeImage(string imageFileName, byte[] imageBytes, Guid objectID, ImageType imageType) { string newImageName = ImageManager.GenerateRandomImgName(imageFileName); string destinationPath = string.Format("{0}{1}/{2}", CFImageInfo.GetRootOSDirectory(imageType), objectID.GetGuidPathString(), newImageName); ImageManager.SaveCorrectlySizedImageUpload(imageFileName, imageBytes, destinationPath, CFImageInfo.GetImageMaxXAxisSize(imageType), CFImageInfo.GetImageMaxYAxisSize(imageType)); return(newImageName); }
/// <summary> /// /// </summary> /// <param name="originalImgPath"></param> /// <param name="resizedImgPath"></param> /// <param name="imageType"></param> public static void SaveResizedThumbnailToDisk(string imageName, string objectIDPath, ImageType imageType) { string originalImgOSPath = string.Format(@"{0}{1}\{2}", CFImageInfo.GetRootOSDirectory(imageType), objectIDPath, imageName); string resizedImgOSPath = string.Format(@"{0}{1}\{2}{3}.png", CFImageInfo.GetRootOSDirectory(imageType), objectIDPath, Path.GetFileNameWithoutExtension(imageName), imageType); ImageResizer.SaveCorrectlySizedImage(originalImgOSPath, resizedImgOSPath, CFImageInfo.GetImageMaxXAxisSize(imageType), CFImageInfo.GetImageMaxYAxisSize(imageType)); }