0

I want to add image interpolation hint as per https://stackoverflow.com/a/14878177/848968

 guard let representation = self.bestRepresentation(for: frame, context: nil,hints: NSImageInterpolation) else {
            return nil

But i keep getting this exception

Cannot convert value of type 'NSImageInterpolation.Type' to expected argument type '[NSImageRep.HintKey : Any]?'
techno
  • 6,100
  • 16
  • 86
  • 192
  • The error it is pretty self explanatory `hints: [.interpolation: NSImageInterpolation.high.rawValue]` – Leo Dabus Apr 04 '20 at 18:07
  • @LeoDabus Thanks.. can you add it as an answer ? Can you help me with this too https://stackoverflow.com/questions/61030581/white-border-around-resized-image – techno Apr 04 '20 at 18:09

1 Answers1

1

The error it is pretty self explanatory.

guard let representation = self.bestRepresentation(for: frame,
                                                   context: nil,
                                                   hints: [.interpolation: NSImageInterpolation.high])
else { return nil }
Leo Dabus
  • 229,809
  • 59
  • 489
  • 571