NSImageView Scaling oddity
NSImageView Scaling oddity
- Subject: NSImageView Scaling oddity
- From: Bill Conner <email@hidden>
- Date: Sat, 26 Mar 2005 17:45:58 -0500
I'm new to cocoa and I thought I'd start by making a simple image viewer but that's proving to be problematic.
I've got a really simple app, a NSImageView pinned to the bounds of a window.
The first problem I stumbled onto was images > 72dpi were miniaturized. I found the issue/solution documented several places and now I'm setting the image size to the bestRepresentationForDevice pW/pH.
Now I'm seeing a very odd behavior, If the window/ImageView is expanded to beyond the image bounds, for a > 72dpi image, the image will abruptly miniaturize and place itself to the bottom, left of center of the ImageView. At this point, reducing the size imageView will not correct the problem but if the imageView is reduced and set to the image again it will be displayed properly.
I've tinkered with programatically changing the view bounds and rastering the image at 72dpi but I feel like I'm making something simple more complex than it needs to be. Can someone tell me how to correct this problem or what the preferred method of rendering an image in a view is?
thanks
-Bill
_______________________________________________
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