/// <summary> /// Initializes a new instance of the <see cref="HeifImage" /> class. /// </summary> /// <param name="image">The image.</param> /// <param name="width">The width.</param> /// <param name="height">The height.</param> /// <param name="imageHandleColorProfile">The image handle color profile.</param> internal HeifImage(SafeHeifImage image, int width, int height, HeifColorProfile imageHandleColorProfile) { Validate.IsNotNull(image, nameof(image)); this.image = image; this.cachedImageColorProfile = imageHandleColorProfile; this.fetchedColorProfileFromImage = this.cachedImageColorProfile != null; this.sync = new object(); this.Width = width; this.Height = height; this.Colorspace = LibHeifNative.heif_image_get_colorspace(image); this.Chroma = LibHeifNative.heif_image_get_chroma_format(image); }