• 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: Scaling TIFFRepresentation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scaling TIFFRepresentation


  • Subject: Re: Scaling TIFFRepresentation
  • From: Nathan Day <email@hidden>
  • Date: Thu, 16 May 2002 16:44:16 +0930

Changing the size only changes the way the image is drawn not the internal bytes representing it. Try creating a new NSImage the new size you want, locking focus on it and drawing your source image into it with the new size, this should re-sample it. Look at NSGraphicsContext to see how you can change the re-sampling quality specificly

-[NSGraphicsContext setShouldAntialias:];
-[NSGraphicsContext setImageInterpolation:];


On Thursday, May 16, 2002, at 03:55 AM, Michael Briscoe wrote:

I'm trying to add an export feature to my program, and it seems to work, except for the scaling. At first I tried to scale the NSBitmapImageRep data directly by setting it's size; all that did was to change it's resolution (dpi). So then I created an NSImage using the NSBitmapImageRep data, and scaled that. According to my NSLog that appears to work, BUT the files are saved at the original screen size. I'm stumped!
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Scaling TIFFRepresentation (From: Michael Briscoe <email@hidden>)

  • Prev by Date: Re: Is there a tutorial/sample for displaying...
  • Next by Date: Re: Resizing an NSTextView Programmatically
  • Previous by thread: Scaling TIFFRepresentation
  • Next by thread: Locking mapped files
  • Index(es):
    • Date
    • Thread