Skip to content
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

feat: Change OpenAI Image Format to JPG #4117

Conversation

michael-genson
Copy link
Collaborator

What type of PR is this?

(REQUIRED)

  • feature

What this PR does / why we need it:

(REQUIRED)

Ollama only supports JPG and PNG formats, so the current implementation breaks since we use WEBP. JPG tends to have universal support, so I switched to that.

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #4097

@lowlyocean
Copy link

File "/opt/pysetup/.venv/lib/python3.10/site-packages/PIL/JpegImagePlugin.py", line 642, in _save
raise OSError(msg) from e
OSError: cannot write mode RGBA as JPEG

Happens when I use the crop feature on the example image provided #4097

@michael-genson
Copy link
Collaborator Author

Good catch, thanks! Newest commit fixes this

boc-the-git
boc-the-git previously approved these changes Aug 30, 2024
mealie/pkgs/img/minify.py Outdated Show resolved Hide resolved
@boc-the-git boc-the-git enabled auto-merge (squash) August 30, 2024 21:16
@boc-the-git boc-the-git merged commit a3f474e into mealie-recipes:mealie-next Aug 30, 2024
11 checks passed
@michael-genson michael-genson deleted the feat/add-more-openai-compatability branch August 30, 2024 22:51
boc-the-git pushed a commit to boc-the-git/mealie that referenced this pull request Sep 28, 2024
boc-the-git pushed a commit to boc-the-git/mealie that referenced this pull request Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] - Create from image returns "Something Went Wrong!" when using Ollama
4 participants