示例#1
0
        public void HelperCanChangeExifDataType()
        {
            int xy = 1;

            using (var img = new Image <Alpha8>(xy, xy))
            {
                var profile = new ExifProfile();
                img.MetaData.ExifProfile = profile;
                profile.SetValue(ExifTag.PixelXDimension, (uint)xy);
                profile.SetValue(ExifTag.PixelYDimension, (uint)xy);

                Assert.Equal(ExifDataType.Long, profile.GetValue(ExifTag.PixelXDimension).DataType);
                Assert.Equal(ExifDataType.Long, profile.GetValue(ExifTag.PixelYDimension).DataType);

                TransformHelpers.UpdateDimensionalMetData(img);

                Assert.Equal(ExifDataType.Short, profile.GetValue(ExifTag.PixelXDimension).DataType);
                Assert.Equal(ExifDataType.Short, profile.GetValue(ExifTag.PixelYDimension).DataType);
            }
        }
 /// <inheritdoc/>
 protected override void AfterImageApply(Image <TPixel> source, Image <TPixel> destination, Rectangle sourceRectangle)
 => TransformHelpers.UpdateDimensionalMetData(destination);