.withExifFocalLength(new Rational(70)) .withExifExposureTime(new Rational(1, 640)) .withExifFNumber(new Rational(11)) .withExifExposureBiasValue(new Rational(-2, 3)) .withExifIsoSpeedRatings(100) .withXmpAuxLensId("1"), .withExifFocalLength(new Rational(20)) .withExifExposureTime(new Rational(1, 20)) .withExifFNumber(new Rational(8)) .withExifExposureBiasValue(new Rational(+1, 3)) .withExifIsoSpeedRatings(200) .withXmpAuxLensId("2"),
AssertJUnit.assertEquals(6.0, exif.getApertureValue().doubleValue()); AssertJUnit.assertEquals(EXIF.Contrast.NORMAL, exif.getContrast()); AssertJUnit.assertEquals(EXIF.CustomRendered.NORMAL_PROCESS, exif.getCustomRendered()); AssertJUnit.assertEquals(1.0, exif.getDigitalZoomRatio().doubleValue()); AssertJUnit.assertEquals(EXIF.ExposureProgram.APERTURE_PRIORITY, exif.getExposureProgram()); AssertJUnit.assertTrue(Arrays.equals(new byte[]{2,0,2,0,1,0,2,1}, exif.getEXIFCFAPattern())); AssertJUnit.assertTrue(Arrays.equals(new byte[]{48, 50, 50, 49}, exif.getEXIFVersion())); AssertJUnit.assertEquals(0.0, exif.getExposureBiasValue().doubleValue()); AssertJUnit.assertEquals(EXIF.ExposureMode.AUTO, exif.getExposureMode()); AssertJUnit.assertEquals(0.00625, exif.getExposureTime().doubleValue()); AssertJUnit.assertEquals(EXIF.FileSource.DSC, exif.getFileSource()); AssertJUnit.assertEquals(0, (int)exif.getFlash()); AssertJUnit.assertEquals(8.0, exif.getFNumber().doubleValue()); AssertJUnit.assertEquals(85.0, exif.getFocalLength().doubleValue()); AssertJUnit.assertEquals(127.0, exif.getFocalLength35mmFilm().doubleValue()); AssertJUnit.assertEquals(EXIF.GainControl.NONE, exif.getGainControl()); AssertJUnit.assertEquals(EXIF.LightSource.UNKNOWN, exif.getLightSource()); AssertJUnit.assertEquals("NIKON CORPORATION", exif.getMake()); AssertJUnit.assertEquals(1.6, exif.getMaxApertureValue().doubleValue()); AssertJUnit.assertEquals(EXIF.MeteringMode.PATTERN, exif.getMeteringMode()); AssertJUnit.assertEquals("NIKON D100", exif.getModel()); AssertJUnit.assertEquals(EXIF.SensingMethod.ONE_CHIP_COLOR_AREA_SENSOR, exif.getSensingMethod()); AssertJUnit.assertEquals(EXIF.Sharpness.NORMAL, exif.getSharpness()); AssertJUnit.assertEquals(7.321928, exif.getShutterSpeedValue().doubleValue()); AssertJUnit.assertEquals(0, (int)exif.getSubjectDistanceRange()); AssertJUnit.assertEquals("70", exif.getSubsecTimeDigitized());
AssertJUnit.assertEquals(new Rational(300, 1), exif.getXResolution()); AssertJUnit.assertEquals(new Rational(300, 1), exif.getYResolution()); AssertJUnit.assertEquals(EXIF.ResolutionUnit.INCHES, exif.getResolutionUnit()); AssertJUnit.assertEquals("Nikon Capture Editor 4.1.3 W", exif.getSoftware()); AssertJUnit.assertEquals("2006:11:11 20:24:33", exif.getDateTime()); AssertJUnit.assertEquals("(C) Copyright 2006 by Fabrizio Giudici", exif.getCopyright()); AssertJUnit.assertEquals(new Rational(1, 320), exif.getExposureTime()); AssertJUnit.assertEquals(new Rational(28, 10), exif.getFNumber()); AssertJUnit.assertEquals(EXIF.ExposureProgram.SHUTTER_PRIORITY, exif.getExposureProgram()); AssertJUnit.assertEquals(400, (int)exif.getISOSpeedRatings()); AssertJUnit.assertEquals(new Rational(8321928, 1000000), exif.getShutterSpeedValue()); AssertJUnit.assertEquals(new Rational(2970854, 1000000), exif.getApertureValue()); AssertJUnit.assertEquals(new Rational(0, 6), exif.getExposureBiasValue()); AssertJUnit.assertEquals(new Rational(3, 1), exif.getMaxApertureValue()); AssertJUnit.assertEquals(EXIF.MeteringMode.PATTERN, exif.getMeteringMode()); AssertJUnit.assertEquals(EXIF.LightSource.FINE_WEATHER, exif.getLightSource()); AssertJUnit.assertEquals(0, (int)exif.getFlash()); AssertJUnit.assertEquals(new Rational(180, 1), exif.getFocalLength());
AssertJUnit.assertEquals(212, (int)tiff.getRowsPerStrip()); AssertJUnit.assertEquals(203520, (int)tiff.getStripByteCounts()); AssertJUnit.assertEquals(new Rational(300, 1), tiff.getXResolution()); AssertJUnit.assertEquals(new Rational(300, 1), tiff.getYResolution()); AssertJUnit.assertEquals(TIFF.PlanarConfiguration.CHUNKY, tiff.getPlanarConfiguration()); AssertJUnit.assertEquals(TIFF.ResolutionUnit.INCHES, tiff.getResolutionUnit()); dump(exif); AssertJUnit.assertEquals(new Rational(3125, 1000000), exif.getExposureTime()); AssertJUnit.assertEquals(new Rational(28, 10), exif.getFNumber()); AssertJUnit.assertEquals(EXIF.ExposureProgram.SHUTTER_PRIORITY, exif.getExposureProgram()); AssertJUnit.assertEquals("2003:07:01 12:29:36", exif.getDateTimeOriginal()); AssertJUnit.assertEquals(new Rational(0, 6), exif.getExposureBiasValue()); AssertJUnit.assertEquals(new Rational(3, 1), exif.getMaxApertureValue()); AssertJUnit.assertEquals(EXIF.MeteringMode.PATTERN, exif.getMeteringMode()); AssertJUnit.assertEquals(EXIF.LightSource.FINE_WEATHER, exif.getLightSource()); AssertJUnit.assertEquals(0, (int)exif.getFlash()); AssertJUnit.assertEquals(new Rational(180, 1), exif.getFocalLength()); AssertJUnit.assertEquals(9996, (long)exif.getMakerNote()); AssertJUnit.assertEquals("ASCII\u0000\u0000\u0000(C) Copyright by Fabrizio Giudici ", new String(exif.getUserComment()));