How do I extract image data from PDF inline image 'Element.Type.e_inline_image'?

Q: How do I extract image data from inline image

For elements of the type e_inline_image, the function
pdftron.PDF.Image(ele.GetXObject()) does not work. Could you please
advise. Here is the problem code snippet

Dim elementType As Element.Type = ele.GetType()
If elementType = Element.Type.e_inline_image Then
        Dim img As pdftron.PDF.Image = New
End If
A: If you encounter inline image element (i.e.
‘Element.Type.e_inline_image’) you can’t use ‘element.GetXObject()’
because, by definition, inline image does not have an xobject.

Instead you could use 'element.GetImageData()' which could be
normalized to RGB using 'pdftron.PDF.Image.Image2RGB' filter.

If you are using .NET version of PDFNet there is also a handful
utility function ‘Element.GetBitmap()’ that returns
‘System.Drawing.Bitmap’. You can use Element.GetBitmap() on either
‘e_inline_image’ or e_image’.