/// <summary>
        /// Function to retrieve the horizontal and vertical offsets for the frames in a multi-frame image.
        /// </summary>
        /// <param name="stream">The stream containing the image data.</param>
        /// <returns>A list of <c>Point</c> values that indicate the offset within the image for each frame.</returns>
        /// <exception cref="ArgumentNullException">Thrown when the <paramref name="stream"/> parameter is <b>null</b>.</exception>
        /// <exception cref="IOException">Thrown when the stream is write-only.
        /// <para>-or-</para>
        /// <para>Thrown when the stream cannot perform seek operations.</para>
        /// </exception>
        /// <exception cref="EndOfStreamException">Thrown when an attempt to read beyond the end of the stream is made.</exception>
        /// <remarks>
        /// <para>
        /// For image codecs that support multiple frames, this reads a list of offset values for each frame so that the frame can be positioned correctly within the base image. If the image does not have
        /// multiple frames, or the codec does not support multiple frames, then an empty list is returned.
        /// </para>
        /// </remarks>
        public IReadOnlyList <DX.Point> GetFrameOffsets(Stream stream)
        {
            if (!SupportsMultipleFrames)
            {
                return(Array.Empty <DX.Point>());
            }

            var wic = new WicUtilities();

            try
            {
                if ((FrameOffsetMetadataNames == null) || (FrameOffsetMetadataNames.Count == 0))
                {
                    return(Array.Empty <DX.Point>());
                }

                IReadOnlyList <DX.Point> result = wic.GetFrameOffsetMetadata(stream, SupportedFileFormat, FrameOffsetMetadataNames);

                if (result == null)
                {
                    throw new IOException(string.Format(Resources.GORIMG_ERR_FILE_FORMAT_NOT_CORRECT, Codec));
                }

                return(result);
            }
            catch (DX.SharpDXException)
            {
                throw new IOException(string.Format(Resources.GORIMG_ERR_FILE_FORMAT_NOT_CORRECT, Codec));
            }
            finally
            {
                wic.Dispose();
            }
        }