• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Resize NSImage without anti-aliasing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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)


-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>


 _______________________________________________
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

  • Follow-Ups:
    • Re: Resize NSImage without anti-aliasing
      • From: Takaaki Naganoya <email@hidden>
References: 
 >Resize NSImage without anti-aliasing (From: Takaaki Naganoya <email@hidden>)
 >Re: Resize NSImage without anti-aliasing (From: Shane Stanley <email@hidden>)
 >Re: Resize NSImage without anti-aliasing (From: Takaaki Naganoya <email@hidden>)

  • Prev by Date: Re: Resize NSImage without anti-aliasing
  • Next by Date: Re: Resize NSImage without anti-aliasing
  • Previous by thread: Re: Resize NSImage without anti-aliasing
  • Next by thread: Re: Resize NSImage without anti-aliasing
  • Index(es):
    • Date
    • Thread