Example #1
0
        public void ConstructFromUnsupportedNative()
        {
            SpiffHeaderNative native = new() {
                Height     = uint.MaxValue,
                ColorSpace = SpiffColorSpace.Rgb
            };

            bool result = SpiffHeader.TryCreate(native, out var header);

            Assert.IsFalse(result);
            Assert.IsNull(header);
        }
Example #2
0
 internal SpiffHeaderNative(SpiffHeader spiffHeader)
 {
     ProfileId            = spiffHeader.ProfileId;
     ComponentCount       = spiffHeader.ComponentCount;
     Height               = (uint)spiffHeader.Height;
     Width                = (uint)spiffHeader.Width;
     ColorSpace           = spiffHeader.ColorSpace;
     BitsPerSample        = spiffHeader.BitsPerSample;
     CompressionType      = spiffHeader.CompressionType;
     ResolutionUnit       = spiffHeader.ResolutionUnit;
     VerticalResolution   = (uint)spiffHeader.VerticalResolution;
     HorizontalResolution = (uint)spiffHeader.HorizontalResolution;
 }