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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-05-2009, 02:06 PM   #1 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 14
Default generate high resolution images for printing as well as viewing on iPhone

I have an app in which I impose text on top of a user-supplied image. Normally I display the result on the iPhone screen. This display is low resolution, 480x320.

I also want to send the result (by email) so that it can be printed. The printed format should be much higher resolution than the on-screen format, for example 300 dpi. So the problems I am facing are: make the image higher resolution, and generate the text at higher resolution.

If I use Quartz to draw on top of a PNG is there an easy way to make it generate a high resolution result? Is there another approach to generating low- and high-resolution imagery that doesn't require writing two versions of the code?
aheirich is offline   Reply With Quote
Old 06-05-2009, 03:48 PM   #2 (permalink)
Registered Member
 
Join Date: Apr 2009
Location: Northern CA
Posts: 152
Default

(I'm a newbie myself, other feel free to correct me)

Create a context - CGBitmapContextCreate
You decide how big it is- it can exceed the iphone screen dimensions.
Draw your image and text into that context. (You will likely need to scale your font programatically to match the resolution your are drawing into.)

You can turn it into a new high res image to display with [UIImage imageWithCGImage:]. This is the image to save/email.

If it is less than 1024 pixels in any dimension, you can add it to a 480x320 imageView and have the view automatically scale to fit. If it is too large, you will need to scale it on your own.

Last edited by paymaster; 06-05-2009 at 03:51 PM.
paymaster is offline   Reply With Quote
Reply

Bookmarks

Tags
png, quartz

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 275
22 members and 253 guests
ADY, Bertrand21, Dani77, fkmtc, HemiMG, iDifferent, IphoneSdk, jakerocheleau, JasonR, jimbo, macquitzon216, MACralik, mer10, NSeven, prchn4christ, Rudy, silverwiz, spiderguy84, Sunny46, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,767
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:02 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0