Marking the initial steps for processing
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 11 Aug 2013 21:53:37 +0000 (16:53 -0500)
committerRodney Ewing <ewing.rj@gmail.com>
Fri, 16 Aug 2013 22:30:16 +0000 (15:30 -0700)
mediagoblin/media_types/image/processing.py

index 83b4adffabd3c113fbc5ba0024e9e0c97cfdbf97..b8ac1a601a32b0df1b34e0aebc230b8401a8511a 100644 (file)
@@ -325,6 +325,18 @@ class CommonImageProcessor(MediaProcessor):
             help=(
                 "Height of the resized image (if not using defaults)"))
 
+    def fetch_original(self):
+        pass
+
+    def generate_medium_if_applicable(self, size=None):
+        pass
+
+    def generate_thumb(self, size=None):
+        pass
+
+    def extract_metadata(self):
+        pass
+
 
 class InitialProcessor(CommonImageProcessor):
     """
@@ -361,6 +373,12 @@ class InitialProcessor(CommonImageProcessor):
             args, ['width', 'height'])
 
 
+    def process(self, size=None, thumb_size=None):
+        self.fetch_original()
+        self.generate_medium_if_applicable(size=size)
+        self.generate_thumb(size=thumb_size)
+        self.extract_metadata()
+
 
 class ImageProcessingManager(ProcessingManager):
     def __init__(self):