• 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: Newbie: Resizing an NSImage using it's NSImageRep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: Resizing an NSImage using it's NSImageRep


  • Subject: Re: Newbie: Resizing an NSImage using it's NSImageRep
  • From: String Larson <email@hidden>
  • Date: Tue, 3 May 2005 09:25:44 -0500

NSImage - setScalesWhenResized and setSize should do it.

On May 3, 2005, at 8:06 AM, Jeff Brown wrote:

Hi Guys

I'm trying to alter the resolution of an image and
then redraw it.

I've created an NSImage from a .jpg file. I then look
at it's size.height and its NSImageRep's pixelHeight
to calculate it's resolution. If the resolution is
above 300, I reduce the pixelHeight and pixelWidth of
the NSImageRep whilst keeping it's size the same so
that I get a resolution of 300 (which should decrease
the image area on the screen once I  assign the
NSImage to an NSImageView). But it doesn't seem to
make a difference.

Is there a way of getting the NSImage to take notice
of the altered values in it's NSImageRep and draw the
image appropriately?

Or is there another way of doing it?

Any help appreciated.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Newbie: Resizing an NSImage using it's NSImageRep (From: Jeff Brown <email@hidden>)

  • Prev by Date: Re: Preferences file in Tiger
  • Next by Date: Documentation update
  • Previous by thread: Newbie: Resizing an NSImage using it's NSImageRep
  • Next by thread: Re: Newbie: Resizing an NSImage using it's NSImageRep
  • Index(es):
    • Date
    • Thread