Re: Resize NSImage without anti-aliasing
Re: Resize NSImage without anti-aliasing
- Subject: Re: Resize NSImage without anti-aliasing
- From: Shane Stanley <email@hidden>
- Date: Wed, 22 Mar 2017 12:27:57 +1100
On 22 Mar 2017, at 12:04 pm, Takaaki Naganoya <email@hidden> wrote:
But the first line you indicated returns nothing. So, variable “theContext” seems empty or undefined.
set theContext to current application’s NSGraphicsContext's setCurrentContext:(current application's NSGraphicsContext's graphicsContextWithBitmapImageRep:aRep)
So the code causes error in next line
theContext’s setShouldAntiAlias:false
Oops -- theContext should be storing the context itself. Try this:
set theContext to current application's NSGraphicsContext's graphicsContextWithBitmapImageRep:aRep current application's NSGraphicsContext's setCurrentContext:theContext theContext's setShouldAntiAlias:false theContext's setImageInterpolation:(current application's NSImageInterpolationNone)
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden