Skip to content

win10 abort while RGBA with jpg suffix #1554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
GuoQuanhao opened this issue Mar 11, 2025 · 0 comments
Open

win10 abort while RGBA with jpg suffix #1554

GuoQuanhao opened this issue Mar 11, 2025 · 0 comments

Comments

@GuoQuanhao
Copy link

Provide environment information

I have a JPG-suffixed image in RGBA format, which caused errors in my annotations. I believe such naming mismatches are not uncommon. Instead of distinguishing between JPG and PNG based on file extensions, we should rely on PIL (Python Imaging Library) to detect the actual format.

if image_pil.mode == "RGBA":
    image_format = "PNG"
else:
    image_format = "JPEG"

Image

What OS are you using?

win10

Describe the Bug

I have a JPG-suffixed image in RGBA format, which caused errors in my annotations. I believe such naming mismatches are not uncommon. Instead of distinguishing between JPG and PNG based on file extensions, we should rely on PIL (Python Imaging Library) to detect the actual format.

Expected Behavior

No response

To Reproduce

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant