hi in my application i need to resize a .jpg image through a command line my code is
NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:filePath]; // get icon from the file at filePath destination NSSize imageSize; imageSize.width = 384.0; // in points (384 pts = 512 px ) imageSize.height = 384.0; [icon setSize:imageSize]; // set image size NSData * tiffData = [icon TIFFRepresentation]; bitmapImageRep = [NSBitmapImageRep imageRepWithData:tiffData]; [[bitmapImageRep representationUsingType:NSJPEGFileType properties:dict] writeToFile:destPath atomically:YES]; // write it to a file path stored in destPath this code is not altering the size at all i cant create a NSView as its a command line app any suggestions ??? how to resize it?? Advance Thanx -Parimal -- -- Warm Regards, Parimal Das _______________________________________________ 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 arch...@mail-archive.com