/// <summary>
        /// Gets a list of the auxiliary image ids.
        /// </summary>
        /// <returns>A list of the auxiliary image ids.</returns>
        /// <exception cref="HeifException">A LibHeif error occurred.</exception>
        /// <exception cref="ObjectDisposedException">The object has been disposed.</exception>
        /// <remarks>
        /// <para>The alpha and/or depth images are omitted from this list.</para>
        /// <para>
        /// LibHeif will include the alpha image (if present) when you call <see cref="Decode(HeifColorspace, HeifChroma, HeifDecodingOptions)"/>
        /// with the <see cref="HeifChroma"/> parameter set to one of the <c>InterleavedRgba</c> values.
        /// </para>
        /// <para>
        /// To read the depth images use <see cref="GetDepthImageIds"/> to get a list of the depth image item ids and
        /// <see cref="GetDepthImage(HeifItemId)"/> to convert the item id to a <see cref="HeifImageHandle"/>.
        /// </para>
        /// </remarks>
        /// <seealso cref="GetAuxiliaryImage(HeifItemId)"/>
        /// <seealso cref="GetAuxiliaryType"/>
        public IReadOnlyList <HeifItemId> GetAuxiliaryImageIds()
        {
            VerifyNotDisposed();

            if (LibHeifVersion.Is1Point11OrLater)
            {
                const heif_auxiliary_image_filter filter = heif_auxiliary_image_filter.OmitAlpha | heif_auxiliary_image_filter.OmitDepth;

                int count = LibHeifNative.heif_image_handle_get_number_of_auxiliary_images(this.imageHandle, filter);

                if (count == 0)
                {
                    return(Array.Empty <HeifItemId>());
                }

                var ids = new HeifItemId[count];

                unsafe
                {
                    fixed(HeifItemId *ptr = ids)
                    {
                        int filledCount = LibHeifNative.heif_image_handle_get_list_of_auxiliary_image_IDs(this.imageHandle,
                                                                                                          filter,
                                                                                                          ptr,
                                                                                                          count);

                        if (filledCount != count)
                        {
                            ExceptionUtil.ThrowHeifException(Resources.CannotGetAllAuxillaryImages);
                        }
                    }
                }

                return(ids);
            }
            else
            {
                return(Array.Empty <HeifItemId>());
            }
        }