def setup(): from willow.registry import registry from willow.image import ( JPEGImageFile, PNGImageFile, GIFImageFile, BMPImageFile, RGBImageBuffer, RGBAImageBuffer, TIFFImageFile, WebPImageFile, ) from willow.plugins import pillow, wand, opencv registry.register_image_class(JPEGImageFile) registry.register_image_class(PNGImageFile) registry.register_image_class(GIFImageFile) registry.register_image_class(BMPImageFile) registry.register_image_class(TIFFImageFile) registry.register_image_class(WebPImageFile) registry.register_image_class(RGBImageBuffer) registry.register_image_class(RGBAImageBuffer) registry.register_plugin(pillow) registry.register_plugin(wand) registry.register_plugin(opencv)
def setup(): from willow.registry import registry from willow.image import ( JPEGImageFile, PNGImageFile, GIFImageFile, BMPImageFile, RGBImageBuffer, RGBAImageBuffer, TIFFImageFile, WebPImageFile, ) from willow.plugins import pillow, wand, opencv from willow.generic_operations import get_pixel_count registry.register_image_class(JPEGImageFile) registry.register_image_class(PNGImageFile) registry.register_image_class(GIFImageFile) registry.register_image_class(BMPImageFile) registry.register_image_class(TIFFImageFile) registry.register_image_class(WebPImageFile) registry.register_image_class(RGBImageBuffer) registry.register_image_class(RGBAImageBuffer) registry.register_plugin(pillow) registry.register_plugin(wand) registry.register_plugin(opencv) registry.register_generic_operation(['get_size', 'get_frame_count'], 'get_pixel_count', get_pixel_count)
def setup(): from willow.registry import registry from willow.image import ( JPEGImageFile, PNGImageFile, GIFImageFile, BMPImageFile, RGBImageBuffer, RGBAImageBuffer, ) from willow.plugins import pillow, wand, opencv registry.register_image_class(JPEGImageFile) registry.register_image_class(PNGImageFile) registry.register_image_class(GIFImageFile) registry.register_image_class(BMPImageFile) registry.register_image_class(RGBImageBuffer) registry.register_image_class(RGBAImageBuffer) registry.register_plugin(pillow) registry.register_plugin(wand) registry.register_plugin(opencv)
""" WSGI config for project project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from willow.registry import registry import rustface.willow registry.register_plugin(rustface.willow) os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project.settings') application = get_wsgi_application()