first successful run of photo llm (#11)
Tests / test_and_lint (push) Successful in 11s

Reviewed-on: #11
Co-authored-by: Mathias Scheider <mathias2784@web.de>
This commit was merged in pull request #11.
This commit is contained in:
2026-10-02 08:16:20 +00:00
committed by mathias2784
parent 0c33153c98
commit 906707de55
7 changed files with 200 additions and 14 deletions
+5
View File
@@ -4,6 +4,8 @@ from pathlib import Path
from PIL import Image
from photools3.models import transform_to_image_dict
class Photo:
@@ -26,3 +28,6 @@ class Photo:
self.image.save(buffer, format="JPEG", quality=85)
image_data = base64.b64encode(buffer.getvalue()).decode("utf-8")
return image_data
def to_llm_image_url(self):
return transform_to_image_dict(self.resize().to_rgb().get_encoded())