def _get_mime_type(pdf_object: LTImage) -> Optional[str]:
    """Determine the MIME type of an image in a PDF based on its filters."""
    # Resolve the stream attributes
    stream_attrs = pdf_object.stream.attrs
    subtype = resolve1(stream_attrs.get("Subtype", ""))
    filters = resolve1(stream_attrs.get("Filter", ""))

    if isinstance(filters, list):
        filter_names = [str(f).lstrip("/").strip("\"'") for f in filters]
    else:
        filter_names = [str(filters).lstrip("/").strip("\"'")] if filters else []

    mime_type = None
    if "DCTDecode" in filter_names:
        mime_type = "image/jpeg"
    elif "JPXDecode" in filter_names:
        mime_type = "image/jp2"
    elif "FlateDecode" in filter_names:
        # Could be PNG or TIFF; may need additional information
        # For simplicity, assume PNG
        mime_type = "image/png"
    elif "CCITTFaxDecode" in filter_names:
        mime_type = "image/tiff"
    elif "JBIG2Decode" in filter_names:
        mime_type = "image/jbig2"

    return mime_type
Determine the MIME type of an image in a PDF based on its filters.
src/openparse/text/pdfminer/core.py