• 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 09:59:59 +1100

On 22 Mar 2017, at 1:34 am, Takaaki Naganoya <email@hidden> wrote:

Is there a way to scale NSImage without anti-aliasing? 

Try changing this:

current application's NSGraphicsContext's setCurrentContext:(current application's NSGraphicsContext's graphicsContextWithBitmapImageRep:aRep)

set theContext to current application's NSGraphicsContext's setCurrentContext:(current application's NSGraphicsContext's graphicsContextWithBitmapImageRep:aRep)
theContext's setShouldAntiAlias:false
theContext's setImageInterpolation:(current application's NSImageInterpolationNone)

The last line is probably unnecessary.

-- 
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>)

  • Prev by Date: Manipulate Contacts with AppleScriptObjC?
  • Next by Date: "current date" not working in AS 2.4?
  • Previous by thread: Resize NSImage without anti-aliasing
  • Next by thread: Re: Resize NSImage without anti-aliasing
  • Index(es):
    • Date
    • Thread