Something went wrong. Try again.
small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo
Something went wrong. Try again.
12345678910111213141516171819"""Write the primary HEIF still as a model-sized JPEG. libheif applies rotation."""
import sys
from PIL import Imagefrom pillow_heif import HeifImageFile
# The bridge also recognizes compatible brands that Pillow's registry misses.with HeifImageFile(sys.argv[1]) as photo: if ( Image.MAX_IMAGE_PIXELS is not None and photo.width * photo.height > Image.MAX_IMAGE_PIXELS ): raise ValueError("HEIF image exceeds the pixel limit") photo.thumbnail((2000, 2000)) rgb = photo.convert("RGB") rgb.info.clear() rgb.save(sys.argv[2], format="JPEG", quality=85)