     jpegData.writeToFile(thumbPath, atomically: true)
     log.debug("Constructed JPEG data written to file: \(thumbPath)")
 
-    //TODO
-    let blurredImage = thumbnailImage
+    // Scale the image up to match the requested max size
+    let scaledThumbnail = thumbnailImage.scaleToFit(sizeToFit: maxSize, imageScale: imageScale)
+    
+    // Blur the image
+    let blurredImage = scaledThumbnail.blur(radius: 1)
+    
+    log.debug("returning blurredImage: \(blurredImage)")
     
     return blurredImage
 }

//  Offset | Length (bytes) | Content
// --------+----------------+------------------------------------------------
//    0    |        1       | Version of dataformat; currently, 1
//    1    |        1       | Width of the thumbnail
//    2    |        1       | Height of the thumbnail
//    3    |        n       | JPEG image data without header (contents of SOS marker)

// JPEG header constants
private let jpegMarkerByte: UInt8 = 0xFF

        log.error("Failed to allocate memory for JPEG data!")
        return nil
    }

    let eoiMarker = [jpegMarkerByte, jpegEOIMarker]
    jpegData.appendData(jpegHeaderData)
    jpegData.appendBytes(UnsafePointer<UInt8>(data.bytes).advancedBy(thumbHeaderLength), length: (data.length - thumbHeaderLength))
    jpegData.appendBytes(UnsafePointer<Void>(eoiMarker), length: eoiMarker.count)
    log.debug("jpegData.length = \(jpegData.length)")
    
    // Patch in the thumbnail size into the copied header to get an result image of the correct size
