This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func convertImageToGrayScale(image: UIImage) -> UIImage { | |
// Create image rectangle with current image width/height | |
let imageRect: CGRect = CGRectMake(0, 0, image.size.width, image.size.height) | |
// Grayscale color space | |
let colorSpace: CGColorSpaceRef = CGColorSpaceCreateDeviceGray() | |
// Create bitmap content with current image size and grayscale colorspace | |
let bitmapInfo = CGBitmapInfo(CGImageAlphaInfo.None.rawValue) | |
var context = CGBitmapContextCreate(nil, UInt(image.size.width), UInt(image.size.height), 8, 0, colorSpace, bitmapInfo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/content/scripts/html2canvas.js b/content/scripts/html2canvas.js | |
index 7ab27ed..52f3eab 100644 | |
--- a/content/scripts/html2canvas.js | |
+++ b/content/scripts/html2canvas.js | |
@@ -2830,9 +2830,10 @@ _html2canvas.Renderer.Canvas = function(options) { | |
newCanvas = doc.createElement('canvas'); | |
newCanvas.width = bounds.width; | |
newCanvas.height = bounds.height; | |
- ctx = newCanvas.getContext("2d"); | |
- |