I have been trying relentlessly to resize a NSImage and save it as a png file in a command line tool (not a windowed app, but I included AppKit to get NSImage support). I tried using setScalesWhenResized along with setSize to no avail (image is not resized when saved), and I also tried locking focus to another image and drawing at a smaller size, but that simply crashes with the following:

2008-08-03 20:49:40.127 imagecompressor[16757:10b] _NXCreateWindow: error setting window property (1002) 2008-08-03 20:49:40.132 imagecompressor[16757:10b] _NXPlaceWindow: error setting window shape (1002) 2008-08-03 20:49:40.132 imagecompressor[16757:10b] _NSShapePlainWindow: error setting window shape (1002) 2008-08-03 20:49:40.144 imagecompressor[16757:10b] PScurrentwindowbounds: CGSGetWindowBounds returned error (1002) Sun Aug 3 20:49:40 imagecompressor[16757] <Error>: CGSImageDataLockDevice: Bad device image source Sun Aug 3 20:49:40 imagecompressor[16757] <Error>: ripc_DrawWindowContents - Cannot acquire window image 2008-08-03 20:49:40.146 imagecompressor[16757:10b] *** - [NSCachedImageRep representationUsingType:properties:]: unrecognized selector sent to instance 0x116c30 2008-08-03 20:49:40.146 imagecompressor[16757:10b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** - [NSCachedImageRep representationUsingType:properties:]: unrecognized selector sent to instance 0x116c30'
2008-08-03 20:49:40.146 imagecompressor[16757:10b] Stack: (
    2527650123,
    2500743419,
    2527679306,
    2527672652,
    2527672850,
    11646,
    10094
)
Trace/BPT trap

I hope someone could come to my aid!
--
定魅刀利
Dimitri Bouniol
[EMAIL PROTECTED]
http://www.appkainime.com/

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to