containers / ai-lab-recipes

Examples for building and running LLM services and applications locally with Podman
Apache License 2.0
103 stars 106 forks source link

fix the photo upload issue in object detection app #691

Closed yangcao77 closed 2 months ago

yangcao77 commented 2 months ago

This PR is to fix the issue while uploading a photo:

cannot write mode RGBA as JPEG

JPG does not support transparency - RGBA means Red, Green, Blue, Alpha - Alpha is transparency.

The Image class has a method convert which can be used to convert RGBA to RGB - after that it will be able to save as JPG.

yangcao77 commented 2 months ago

@MichaelClifford @rhatdan @Gregory-Pereira May I get a review on this PR? Thanks!

rhatdan commented 2 months ago

LGTM