public ResultMedia GetfromImageFile(FileInfo file, string testNamePrefix, string mediaLocation, bool hideSections = false) { var imageName = testNamePrefix + "_" + Guid.NewGuid() + file.Extension; var fileLength = file.Length; if (hideSections) { var rectangles = new List <RectangleDimesion> { new RectangleDimesion(60, 110, 1100, 240) }; _pdfToImageConverter.HideEcgFinding(file.FullName, (mediaLocation + imageName), _logger, rectangles); } else { file.MoveTo(mediaLocation + imageName); } var thumbnailImageName = "Thumb_" + imageName; CreateThumbnailImage(mediaLocation + imageName, mediaLocation + thumbnailImageName); decimal thumbnailFileLength = new FileInfo(mediaLocation + thumbnailImageName).Length; return(new ResultMedia { File = new Core.Application.Domain.File { FileSize = fileLength, Path = imageName, UploadedOn = DateTime.Now, Type = FileType.Image }, Thumbnail = new Core.Application.Domain.File { FileSize = thumbnailFileLength, Path = thumbnailImageName, UploadedOn = DateTime.Now, Type = FileType.Image } }); }
public void HideEcgFindingTest() { _pdftoImageConverter.HideEcgFinding(Source1, destination1, null, new List <RectangleDimesion> { new RectangleDimesion(60, 110, 1100, 240) }); }