Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 05-21-2009, 11:32 AM   #2 (permalink)
cbiggin
Registered Member
iPhone Dev SDK Supporter
 
Join Date: Oct 2008
Location: Toronto, Canada
Posts: 18
cbiggin is on a distinguished road
Send a message via Skype™ to cbiggin
Default

You have to create your new context at the dimensions of the photo, then draw into the new dimensions. Also, I don't think you need to push/pop the current context. Try this:

Code:
    CGFloat imageWidth = CGImageGetWidth([inImage CGImage]);
    CGFloat imageHeight = CGImageGetHeight([inImage CGImage]);
    UIGraphicsBeginImageContext(CGSizeMake(imageWidth, imageHeight));
    CGRect drawRect = CGRectMake(0, 0, 768, 1024);
    [inImage drawInRect:drawRect];
    newImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
__________________
My iPhone Apps:
KillerSudoku - very difficult variation of Sudoku... popular in UK.
Chris Bosh - his personal app!
PocketCocktails
NerdAlert2000
SixPack App
Easy Recipes
cbiggin is offline   Reply With Quote
 

» Advertisements
» Online Users: 474
18 members and 456 guests
7twenty7, buggen, ClerurcifeDer, Clouds, Duncan C, e2applets, iAppDeveloper, ipodphone, KarlJay, krisk, linkmx, ryantcb, sacha1996, Sami Gh, stanny, Steven.C, Studder, yomo710
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,638
Threads: 94,102
Posts: 402,826
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Studder
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:44 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.