Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSImage Size

NSImage Size
Thread Tools
zachs
Mac Elite
Join Date: May 2002
Location: New York City
Status: Offline
Reply With Quote
May 24, 2003, 11:05 PM
 
This may be a stupid question, but how do I set the size of an image in an NSImageView?

Thanks for any help.
     
bewebste
Senior User
Join Date: Mar 2000
Location: Ithaca, NY
Status: Offline
Reply With Quote
May 25, 2003, 12:01 PM
 
There are two things you can do to affect the size of the image drawn in an NSImageView. If you call setScalesWhenResized: on your NSImage object and pass in YES, you can then call setSize: on the NSImage and it will automatically scale the image to the new size. You can also call setImageScaling: on the NSImageView to tell it how to draw the image within its frame. You can have it not change the size at all, draw the image to fill its entire frame, or size it proportionally to fit one dimension of the frame but maintain the same height/width ratio.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 05:08 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,