     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
 }

private let jpegSOSMarker: UInt8 = 0xDA // Start of Scan
private let jpegSOF0Marker: UInt8 = 0xC0 // Start of Frame (baseline DCT-based JPEG)

// Current thumbnail packet header version
private let headerPacketVersion: UInt8 = 0x01

/// Returns the JPEG header data, reading it from bundle if not already in memory
private func getJpegHeader() -> NSData {

        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
