Skip to content

Commit

Permalink
Fix issue with Mac build
Browse files Browse the repository at this point in the history
Add NSImage cases for `pngData`.
  • Loading branch information
MarcoDotIO committed Nov 10, 2023
1 parent dd4a98c commit ede52ae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sources/OpenAIKit/Extensions/NSImageExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ extension NSImage {
cgSize.width = 1024
cgSize.height = 1024
break
case .extraLargeLandscape:
cgSize.width = 1792
cgSize.height = 1024
break
case .extraLargePortrait:
cgSize.width = 1024
cgSize.height = 1792
break
}

guard let bitmap = NSBitmapImageRep(
Expand Down

0 comments on commit ede52ae

Please sign in to comment.