Skip to content

Commit

Permalink
Merge pull request #1783 from danielgindi/legacy/fix-wrong-image-type
Browse files Browse the repository at this point in the history
Fix png image using JPEG type when being saved on macOS
  • Loading branch information
pmairoldi committed Nov 4, 2016
2 parents f722f2d + 7d7abd3 commit 4c1c2d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Charts/Utils/ChartPlatform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 4c1c2d2

Please sign in to comment.