image interpolation (smoothing) behavior?

I’m working a project dealing with images so I’ve been looking at the NSGraphicsContext Class Reference found here.

Specifically I’m looking at the imageIterpolation and setImageInterpolation: references. They deal with image smoothing. I notice that there’s a setting called “NSImageInterpolationHigh” and I’m wondering if the normal behavior of an image view, when scaling an image, uses high interpolation. There’s also an NSImageInterpolationDefault setting and I would guess that this is the interpolation used, although I’m not sure.

So that’s my question… which is used, the high or default setting? Also I would like to know how to change that behavior.

I tried to find the image interpolation using the following but didn’t get a result.
set imageInterpolation to call method “imageInterpolation” of (image view “iv” of view “v” of window “main”)
log imageInterpolation

I also tried setting the image interpolation with the following but couldn’t tell if that made any difference.
call method “setImageInterpolation” of (image view “iv” of view “v” of window “main”) with parameter “NSImageInterpolationHigh”

So does anyone have any experience with this?

I made a little progress today but I still need help. Here’s what I found. There are 4 settings for setImageInterpolation: as follows.

NSImageInterpolationDefault
NSImageInterpolationNone
NSImageInterpolationLow
NSImageInterpolationHigh

To set them by calling this method the parameter has to be an integer. I found out what the integers are… 0, 1, 2, and 3 in order as shown above.

So my call has to be something like this…
call method “setImageInterpolation:” of (image view “iv” of view “v” of window “main”) with parameter 3

But it still doesn’t work because the “(image view “iv” of view “v” of window “main”)” part is still wrong. It seems I may have to set my image view to be the current graphics context first, because the commands work on the current graphics context. So I tried to find out what the current image interpolation is like so…

call method “setCurrentContext:” with parameter (image view “iv” of view “v” of window nameMainWindow)
set ii to call method “imageInterpolation”
log “current image interpolation is:”
log ii

But that didn’t work so I’m still doing something wrong. Please help if you can!