Skip to content

Fix BMP image resizing by mapping image/bmp to Pillow BMP format - #13748

Closed
adityav1709 wants to merge 1 commit into
deepset-ai:mainfrom
adityav1709:fix/13742-bmp-mime-format
Closed

adityav1709 wants to merge 1 commit into
deepset-ai:mainfrom
adityav1709:fix/13742-bmp-mime-format

Conversation

@adityav1709

Copy link
Copy Markdown

FORMAT_TO_MIME maps both BMP and DIB to image/bmp, so the inverted MIME_TO_FORMAT keeps DIB, which can neither open real .bmp files nor write valid ones, and resizing BMP images fails. This change maps image/bmp to BMP, following the existing precedent that hand patches image/jpg to JPEG. Includes a release note and regression tests. Fixes #13742. Built with Muse (Aurora) as co-author.

FORMAT_TO_MIME maps both BMP and DIB to image/bmp, so the inverted MIME_TO_FORMAT keeps DIB, which can neither open real .bmp files nor write valid ones. Resizing BMP images fails as a result.

Map image/bmp to BMP, following the existing precedent that hand patches image/jpg to JPEG.

Fixes deepset-ai#13742

Signed-off-by: adityav1709 <adityav170920@gmail.com>
Co-authored-by: Muse (Aurora)
@adityav1709
adityav1709 requested a review from a team as a code owner November 14, 2026 11:49
@adityav1709
adityav1709 requested review from sjrl and removed request for a team November 14, 2026 11:49
@vercel

vercel Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

@adityav1709 is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant

CLAassistant commented Nov 14, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown
Contributor

Hi @adityav1709, thanks for your interest in contributing to Haystack! 🙏

⚠️ Issue #13742 is already being addressed by open pull request(s) #13743. Before opening a PR for an issue, please check whether a PR is already linked to it, and consider contributing to the existing PR instead. We may close duplicate PRs to keep the review queue manageable.

This is an automated message to help us keep the review queue healthy.

@HaystackBot

Copy link
Copy Markdown
Contributor

Hi @adityav1709, thanks a lot for your contribution! 🙏

We noticed that the Contributor License Agreement (CLA) check (license/cla) hasn't passed yet, so we've temporarily moved this PR to draft and paused the review assignment.

To get your PR reviewed, please sign the CLA via the link in the license/cla check below (or in the CLA bot comment). As soon as the check turns green, this PR will automatically be marked ready for review again and a reviewer will be re-assigned.

@HaystackBot
HaystackBot removed the request for review from sjrl November 14, 2026 12:51
@HaystackBot HaystackBot added the cla-pending PR is in draft until the contributor signs the CLA label Nov 14, 2026
@HaystackBot
HaystackBot marked this pull request as draft November 14, 2026 12:51
@HaystackBot
HaystackBot marked this pull request as ready for review November 14, 2026 14:16
@HaystackBot
HaystackBot requested a review from sjrl November 14, 2026 14:16
@HaystackBot HaystackBot removed the cla-pending PR is in draft until the contributor signs the CLA label Nov 14, 2026
@HaystackBot

Copy link
Copy Markdown
Contributor

Thanks for signing the CLA, @adityav1709! 🎉 This PR is now ready for review again and the reviewer has been re-assigned.

@sjrl

sjrl commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Closing as a duplicate of #13743

@sjrl sjrl closed this Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resizing BMP images fails: image/bmp is mapped to Pillow's headerless DIB format

4 participants