From 7d7abd361fe564318e88d54b78f4b8cd3c4dbd2e Mon Sep 17 00:00:00 2001 From: Pierre-Marc Airoldi Date: Thu, 3 Nov 2016 23:37:52 -0400 Subject: [PATCH] fix png image using JPEG type --- Source/Charts/Utils/ChartPlatform.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Charts/Utils/ChartPlatform.swift b/Source/Charts/Utils/ChartPlatform.swift index f3e6e18f79..631ab31005 100644 --- a/Source/Charts/Utils/ChartPlatform.swift +++ b/Source/Charts/Utils/ChartPlatform.swift @@ -509,7 +509,7 @@ types are aliased to either their UI* implementation (on iOS) or their NS* imple image.lockFocus() let rep = NSBitmapImageRep(focusedViewRect: NSMakeRect(0, 0, image.size.width, image.size.height)) image.unlockFocus() - return rep?.representationUsingType(.JPEG, properties: [:]) + return rep?.representationUsingType(.PNG, properties: [:]) } func NSUIImageJPEGRepresentation(image: NSUIImage, _ quality: CGFloat = 0.9) -> NSData?