original image size is not retained when it is exported as PDF using CGImageDestinationRef
original image size is not retained when it is exported as PDF using CGImageDestinationRef
- Subject: original image size is not retained when it is exported as PDF using CGImageDestinationRef
- From: Deepa <email@hidden>
- Date: Fri, 25 Feb 2011 17:46:58 +0530
- "x-copyrighted-material: http://www.robosoftin.com"
Hi,
Please correct if I am posting to wrong mailing list.
I am developing a Desktop application that supports exporting an PNG image to different image formats.
When I export my PNG to (Refer the first link) to PDF format, it appears as 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 does this happen? Am I doing something wrong in the code? How do I solve this?
Following is the code snippet that I use for 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
-----------------------------------------------
Robosoft Technologies - Come home to Technology
Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden