NSImage or CIImage? Resolution problem
NSImage or CIImage? Resolution problem
- Subject: NSImage or CIImage? Resolution problem
- From: "Bill So" <email@hidden>
- Date: Wed, 2 Aug 2006 01:08:38 +0800
Dear All,
I am a bit new to graphics programming. I am trying to display an
image in a customer NSView.
The custom NSView is very simple. It just displays an image in the
drawRect: method like below:
sampleImage = [NSImage imageNamed:@"myimage.jpg"];
[sampleImage compositeToPoint:NSMakePoint(0.0, 0.0)
operation:NSCompositeSourceOver];
sampleImage is an NSImage object.
sampleImage is from a JPG file which was obtained from my DC. (And I
scaled it down to 800 x 600)
Below is the info. of the image in "Preview" app.
File Name myimage.jpg
Document Type JPEG Image
File Size 218439 bytes
Color Model RGB
Depth 8
DPI Height 300
DPI Width 300
Orientation 1
Pixel Height 600
Pixel Width 800
Profile Name Camera RGB Profile
When I call [sampleImage size], the returned size is not 800 x 600.
It is 192 x 144. How do I get NSImage use the exact pixel size? (i.e.
800 x 600)
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Images/chapter_7_section_2.html#//apple_ref/doc/uid/TP40003290-CH208-SW2
Read the doc above but it just gives too little info for what I need to know...
Please kindly advise.
Thanks for helping.
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