/// <summary> /// Gets the encoder parameter list. /// </summary> /// <returns>The encoder parameter list.</returns> /// <exception cref="HeifException">An error occurred when creating the encoder parameter.</exception> private unsafe ReadOnlyCollection <IHeifEncoderParameter> GetEncoderParameterList() { var encoderParameters = new List <IHeifEncoderParameter>(); var parameterList = LibHeifNative.heif_encoder_list_parameters(this.encoder); if (parameterList.Value != IntPtr.Zero) { var encoderParameter = (heif_encoder_parameter *)parameterList.Value; while (*encoderParameter != heif_encoder_parameter.Null) { encoderParameters.Add(HeifEncoderParameterFactory.Create(this.encoder, *encoderParameter)); encoderParameter++; } } return(encoderParameters.AsReadOnly()); }