osx - original image size is not retained when it is exported as PDF using CGImageDestinationRef -


i developing desktop application supports exporting png image different image formats.

when export png image (refer first link) pdf format, appears shown in link2.

http://www.flickr.com/photos/36018837@n05/5472635835/ (original image) http://www.flickr.com/photos/36018837@n05/5473232908/ (exported image)

the image has become larger.

why happen? doing wrong in code? how solve this?

following code snippet use export: //filepath: destination path //exporttype: kuttypepdf

cgimagedestinationref imagedestination = cgimagedestinationcreatewithurl((cfurlref)filepath,(cfstringref )exporttype,1,null); bool success = no;

if( imagedestination != null ) { cgimageref imageref = [ inimage createcgimage ]; if( imageref != null ) { cgimagedestinationaddimage(imagedestination, imageref, null); success = cgimagedestinationfinalize(imagedestination); cgimagerelease(imageref ); } cfrelease( imagedestination ); }

thanks in advance.

regards, deepa

i got reason problem in link: http://lists.apple.com/archives/cocoa-dev/2011/feb/msg00868.html


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -