Hello all, I have some Questions. 1. I try to write NSImage to file. NSImage *image = [NSImage imageNamed:@"test.png"]; NSBitmapImageRep *imageRep; imageRep = [[NSBitmapImageRep alloc] initWithData:[image TIFFRepresentation]]; NSData *imageData; imageData = [imageRep representationUsingType:NSPNGFileType properties:nil]; [imageData writeToFile:@"result.png" atomically:YES]; I got "result.png". But!! "result.png" has diffrent size with "test.png". When I try to NSLog(@"image info : %@",test.png); and NSLog(@"image info : %@",result.png); Then, test.png (original image) size is {1599.8, 1199.85} and result.png size is {1600,1200}. Why? Why do they have different file size? Where is wrong? or TIFFRepresentation rounded up? 2. And, Some original/saved files have same width, height size, But they have different file size!! Although 'test.png' and 'result.png' are {1600,1200}, But they have 500KB(test.png) and 700KB(result.png). I know the PNG file doesn't compress, so I don't know why they have different file size... 3. Last one, when I use JPEG file, I have to know the compression of original image. (When I save the new image, compression is needed.) How can I know/get the compression of JPEG file? Plz let me know. ThankYou.
_______________________________________________
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]