public void Test() { ImageTest.Run("sample_olympus_corrupt_mn.jpg", false, new JpegOlympusCorruptMNTestInvariantValidator() ); }
public void Test() { // This file is originally created with GIMP and the metadata was modified // by exiftool. // The test is to test some properties of ImageTag ImageTest.Run("sample_gimp_exiftool.jpg", true, new JpegPropertyTestInvariantValidator(), NoModificationValidator.Instance, new PropertyModificationValidator <string> ("Creator", "Isaac Newton", "Albert Einstein"), new PropertyModificationValidator <string> ("Copyright", "Free to Copy", "Place something here"), new PropertyModificationValidator <string> ("Comment", "This is an image Comment", "And here comes another image comment"), new PropertyModificationValidator <string> ("Title", "Sunrise", "Eclipse"), new PropertyModificationValidator <string> ("Software", "Exiftool", "Unit tests"), new PropertyModificationValidator <string[]> ("Keywords", new string [] { "keyword 1", "keyword 2" }, new string [] { "keyword a", "keyword b", "keyword 2" }), new PropertyModificationValidator <uint?> ("Rating", 5, 2), new TagPropertyModificationValidator <string> ("Creator", null, "Albert Einstein", TagTypes.TiffIFD, true), new TagPropertyModificationValidator <string> ("Copyright", "Free to Copy", "Place something here", TagTypes.TiffIFD, true), new TagPropertyModificationValidator <string> ("Comment", null, "And here comes another image comment", TagTypes.TiffIFD, true), new TagPropertyModificationValidator <string> ("Software", "Exiftool", "Unit tests", TagTypes.TiffIFD, true), new TagPropertyModificationValidator <string> ("Creator", "Isaac Newton", "Albert Einstein", TagTypes.XMP, true), new TagPropertyModificationValidator <string> ("Copyright", null, "Place something here", TagTypes.XMP, true), new TagPropertyModificationValidator <string> ("Comment", "This is an image Comment", "And here comes another image comment", TagTypes.XMP, true), new TagPropertyModificationValidator <string> ("Title", "Sunrise", "Eclipse", TagTypes.XMP, true), new TagPropertyModificationValidator <string> ("Software", null, "Unit tests", TagTypes.XMP, true), new TagPropertyModificationValidator <string[]> ("Keywords", new string [] { "keyword 1", "keyword 2" }, new string [] { "keyword a", "keyword b", "keyword 2" }, TagTypes.XMP, true), new TagPropertyModificationValidator <uint?> ("Rating", 5, 2, TagTypes.XMP, true), new TagPropertyModificationValidator <string> ("Comment", "This is an image Comment", "And here comes another image comment", TagTypes.JpegComment, true) ); }
public void Test() { ImageTest.Run("sample_badifdentrytype.jpg", false, new InvalidIFDEntryTypeTestInvariantValidator() ); }
public void Test() { ImageTest.Run("sample_null_orientation.jpg", new NullOrientationInvariantValidator(), NoModificationValidator.Instance ); }
public void Lenna_is_perfectly_reconstructed_after_5_steps() { Laplacian2D <YuvD> transform = new Laplacian2D <YuvD>(new DigitalFilter(new Dirichlet(3), 2), new DigitalFilter(new Dirichlet(2), 2)); Image <YuvD> lenna = Image <YuvD> .Load("Lenna.png"); ImageTest.AssertEquals(transform.Inverse(transform.Forward(lenna, 5)), lenna); }
public void Test() { ImageTest.Run("sample_bgo631333.jpg", new BGO631333TestInvariantValidator(), NoModificationValidator.Instance ); }
public void Test() { ImageTest.Run("sample_invalidifdoffset.jpg", false, new InvalidIFDOffsetTestInvariantValidator() ); }
public void Test() { ImageTest.Run("raw-samples/RAW", "RAW_LEICA_DIGILUX2_SRGB.RAW", false, new RawLeicaDigilux2TestInvariantValidator() ); }
public void Test() { ImageTest.Run("raw-samples/DNG", "RAW_LEICA_M8.DNG", false, new DngLeicaM8InvariantValidator() ); }
public void Test() { ImageTest.Run("sample_bgo493530.jpg", false, new BGO493530TestInvariantValidator() ); }
public void Test() { ImageTest.Run("sample_recursive_ifd.jpg", false, new RecursiveIFDTestInvariantValidator() ); }
public void Test() { // This file is originally created with GIMP and was modified with png crush: ImageTest.Run("sample_gimp_pngcrush.png", true, new PngGimpPngcrushTestInvariantValidator(), NoModificationValidator.Instance, new PropertyModificationValidator <string> ("Comment", "Modified with pngcrush", "$% ¬ Test Comment äö "), new PropertyModificationValidator <string> ("Creator", "Isaac Newton", "Albert Einstein"), #if HAVE_SHARPZIPLIB new PropertyModificationValidator <string> ("Title", "Sunrise", "Eclipse"), #endif new TagPropertyModificationValidator <string> ("Comment", "Modified with pngcrush", "$% ¬ Test Comment äö ", TagTypes.Png, true), new TagPropertyModificationValidator <string> ("Creator", "Isaac Newton", "Albert Einstein", TagTypes.Png, true), #if HAVE_SHARPZIPLIB new TagPropertyModificationValidator <string> ("Title", "Sunrise", "Eclipse", TagTypes.Png, true), #endif new TagPropertyModificationValidator <string> ("Comment", null, "$% ¬ Test Comment äö ", TagTypes.XMP, false), new TagPropertyModificationValidator <string> ("Creator", null, "Albert Einstein", TagTypes.XMP, false), new TagPropertyModificationValidator <string> ("Title", null, "Eclipse", TagTypes.XMP, false), new TagKeywordsModificationValidator(TagTypes.XMP, false), new RemoveMetadataValidator(TagTypes.Png) ); }
public void Test() { ImageTest.Run("sample_bgo625367.jpg", false, new BGO625367TestInvariantValidator() ); }
public void Test() { ImageTest.Run("sample_canon_bibble5.jpg", new JpegCanonBibble5TestInvariantValidator(), NoModificationValidator.Instance ); }
public void Forward_transform_produces_correct_downsampled_image() { Image <double> expected = new Image <double>(new[, ] { { 2, 9.5, 25.5 }, { 2, 9.5, 25.5 } }); ImageTest.AssertEquals(laplacian.Forward(source)[0], expected); }
public void Test() { ImageTest.Run("sample_gimp_lzw.tiff", ImageTest.CompareLargeImages, new TiffGimp1TestInvariantValidator(), NoModificationValidator.Instance ); }
public void Convolute_with_scale_2_results_in_blurred_image() { Image expected = new Image(new[, ] { { 2.0, 4.5, 9.5, 16.5, 25.5, 32.33333333333333 }, { 2.0, 4.5, 9.5, 16.5, 25.5, 32.33333333333333 }, { 1.5, 3.375, 7.125, 12.375, 19.125, 24.25 }, { 0.6666666666666666, 1.5, 3.166666666666666, 5.5, 8.5, 10.77777777777777 } }); ImageTest.AssertEquals(linear2.Convolute(source), expected); }
public void Deny_Unrestricted() { ImageTest unit = new ImageTest(); unit.DefaultProperties(); unit.NullProperties(); unit.CleanProperties(); unit.Render(); }
public void Forward_transform_produces_correct_difference_image() { Image <double> expected = new Image <double>(new[, ] { { -2.5555555555555555, -3.6666666666666666, -3.6666666666666666, -7.3333333333333333, -9.0, 13.3333333333333333 }, { -1.6666666666666666, -1.7500000000000000, -0.5000000000000000, -1.5000000000000000, -0.5, 19.0000000000000000 }, { -1.6666666666666666, -1.7500000000000000, -0.5000000000000000, -1.5000000000000000, -0.5, 19.0000000000000000 }, { -0.7777777777777777, +0.1666666666666666, +2.6666666666666666, +4.3333333333333333, +8.0, 24.6666666666666666 } }); ImageTest.AssertEquals(laplacian.Forward(source)[1], expected); }
public void Test() { ImageTest.Run("sample_nikon1_bibble5.jpg", new JpegNikon1Bibble5TestInvariantValidator(), NoModificationValidator.Instance, new CommentModificationValidator(string.Empty), new TagCommentModificationValidator(null, TagTypes.TiffIFD, true), new TagCommentModificationValidator(null, TagTypes.XMP, true), new TagKeywordsModificationValidator(new string[] { }, TagTypes.XMP, true) ); }
public void Test() { ImageTest.Run("sample_no_metadata.jpg", new JpegNoMetadataTestInvariantValidator(), NoModificationValidator.Instance, new NoModificationValidator(), new TagCommentModificationValidator(TagTypes.TiffIFD, false), new TagCommentModificationValidator(TagTypes.XMP, false), new TagKeywordsModificationValidator(TagTypes.XMP, false) ); }
public void Test() { ImageTest.Run("sample_xap.jpg", new XapTestInvariantValidator(), new NoModificationValidator(), new CommentModificationValidator("Communications"), new TagCommentModificationValidator("Communications", TagTypes.TiffIFD, true), new TagCommentModificationValidator("Communications", TagTypes.XMP, true), new KeywordsModificationValidator(new string [] { "Communications" }), new TagKeywordsModificationValidator(new string [] { "Communications" }, TagTypes.XMP, true) ); }
/// <summary> /// Following are the functions that contain the logic that is executed once a button is pressed /// </summary> #region Buttons Logic private void SyncTest() { TotalTimeWatch.Start(); //Initialize instances of Progress class that are later used to trigger //the events that update UI Progress <ImageTestReportModel> imageTestProgress = new Progress <ImageTestReportModel>(); imageTestProgress.ProgressChanged += ImageTestProgressEvent; Progress <PNumTestReportModel> pNumTestProgress = new Progress <PNumTestReportModel>(); pNumTestProgress.ProgressChanged += PNumTestProgressEvent; Progress <WebsitesTestReportModel> websitesTestProgress = new Progress <WebsitesTestReportModel>(); websitesTestProgress.ProgressChanged += WebsitesTestProgressEvent; //Start executing each test sequentially ImageTestWatch.Start(); ImageTest.StartSync(imageTestProgress); ImageTestWatch.Stop(); ImageTestCheckmarkVisibility = Visibility.Visible; PNumTestWatch.Start(); PrimeNumbersTest.StartSync(pNumTestProgress, pNumRangeTest, pNumNthTest); PNumTestWatch.Stop(); PNumTestCheckmarkVisibility = Visibility.Visible; WebsitesTestWatch.Start(); try { WebsitesTest.StartSync(websitesTestProgress); WebsitesTestCheckmarkVisibility = Visibility.Visible; } catch (WebException) { WebsitesTestProgressBarColour = new SolidColorBrush(Colors.Red); WebsitesTestCrossmarkVisibility = Visibility.Visible; } WebsitesTestWatch.Stop(); //Enable Reset button to let the user observe the results //and then reset UI before next run SyncBtnIsEnabled = ParallelBtnIsEnabled = false; ResetBtnIsEnabled = true; //Stop Total timer and update all timers TotalTimeWatch.Stop(); UpdateTimers(this, new EventArgs()); //Push the results of execution to the results manager ResultsDataManager.SetResults("Synchronous", ImageTestTimerText, PNumTestTimerText, WebsitesTestTimerText, TotalTimeText, true); }
public void Test() { // This file is originally created with GIMP. ImageTest.Run("sample_gimp.png", true, new PngGimpTestInvariantValidator(), NoModificationValidator.Instance, new CommentModificationValidator("Created with GIMP"), new TagCommentModificationValidator("Created with GIMP", TagTypes.Png, true), new TagKeywordsModificationValidator(TagTypes.XMP, false), new RemoveMetadataValidator(TagTypes.Png) ); }
public void Test() { // This file is originally created with GIMP and the metadata was modified // by exiftool. ImageTest.Run("sample_exiftool.gif", true, new GifExiftoolTestInvariantValidator(), NoModificationValidator.Instance, new TagKeywordsModificationValidator(new[] { "Keyword 1", "Keyword 2" }, TagTypes.XMP, true), new CommentModificationValidator("Created with GIMP"), new TagCommentModificationValidator("Created with GIMP", TagTypes.GifComment, true), new RemoveMetadataValidator(TagTypes.GifComment | TagTypes.XMP), new RemoveMetadataValidator(TagTypes.GifComment | TagTypes.XMP, TagTypes.GifComment) ); }
public void Test() { // This file is originally created with GIMP and the metadata was modified // by exiftool. Furthermore, the file is modified in the following way: // (1) the blocks which contain the metadata are moved to the end of the file. // This is allowed and should be handled correctly by taglib. // (2) XMP Block is removed. ImageTest.Run("sample_exiftool_tangled3.gif", true, new GifExiftoolTangled3TestInvariantValidator(), NoModificationValidator.Instance, new TagKeywordsModificationValidator(new string[] { }, TagTypes.XMP, false), new CommentModificationValidator("Created with GIMP"), new TagCommentModificationValidator("Created with GIMP", TagTypes.GifComment, true), new RemoveMetadataValidator(TagTypes.GifComment) ); }
public async Task <Unit> Handle(Command request, CancellationToken cancellationToken) { var imagetest = new ImageTest { Id = request.Id, testId = request.testId, file = request.file }; _context.ImageTest.Add(imagetest); var success = await _context.SaveChangesAsync() > 0; if (success) { return(Unit.Value); } throw new Exception("Problem saving changes"); }
public void Test() { // This file is originally created with GIMP and the metadata was modified // by exiftool. Furthermore, the file is modified in the following way: // (1) the version 89a is substituted by 87a, this leads to an invalid 87a // file, but we change the version if we write metadata. // (2) the blocks which contain the metadata are moved to the end of the file. // This is allowed and should be handled correctly by taglib. // (3) Gif Comment block is removed ImageTest.Run("sample_exiftool_tangled2.gif", true, new GifExiftoolTangled2TestInvariantValidator(), NoModificationValidator.Instance, new TagKeywordsModificationValidator(new[] { "Keyword 1", "Keyword 2" }, TagTypes.XMP, true), new CommentModificationValidator(), new TagCommentModificationValidator(null, TagTypes.GifComment, false), new RemoveMetadataValidator(TagTypes.XMP) ); }
public void Test() { // This file is originally created with GIMP and the metadata was modified // by exiftool. A very long comment is added by exiftool because such comments // are stored in multiple sub-blocks. This should be handled by taglib. ImageTest.Run("sample_exiftool_long_comment.gif", true, new GifExiftoolLongCommentTestInvariantValidator(), NoModificationValidator.Instance, new TagKeywordsModificationValidator(new string[] { }, TagTypes.XMP, true), new CommentModificationValidator(long_comment_orig), new CommentModificationValidator(long_comment_orig, long_comment_test), new TagCommentModificationValidator(long_comment_orig, TagTypes.GifComment, true), new TagCommentModificationValidator(long_comment_orig, long_comment_test, TagTypes.GifComment, true), new RemoveMetadataValidator(TagTypes.GifComment | TagTypes.XMP), new RemoveMetadataValidator(TagTypes.GifComment | TagTypes.XMP, TagTypes.GifComment), new RemoveMetadataValidator(TagTypes.GifComment | TagTypes.XMP, TagTypes.XMP) ); }
public void Test() { ImageTest.Run(TestPath.GetRawSubDirectory("DNG"), "RAW_LEICA_M8.DNG", false, new DngLeicaM8InvariantValidator()); }