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 02-27-2010, 02:02 PM   #3 (permalink)
fernan3682
Registered Member
 
fernan3682's Avatar
 
Join Date: Feb 2010
Location: Valencia
Posts: 11
fernan3682 is on a distinguished road
Default

Hi tychop, thanks for your help.
I´ve already tried that but the result is not a text as part of the image, I mean, if I try to show that UIimage in other UIImageViewer the text doen´s appear.

This is my code:

CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
CGContextRef context = CGBitmapContextCreate(NULL, width, height, 8, 4 * width, colorSpace, kCGImageAlphaPremultipliedFirst);

CGContextSetRGBStrokeColor(context, 1.0, 1.0, 1.0, 1.0);
CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1.0);
//White background
CGContextFillRect(context, CGRectMake(0.0, 0.0, width, height));
CGContextSelectFont(context, "Arial", 6, kCGEncodingMacRoman);
CGContextSetTextDrawingMode(context, kCGTextFill);
CGContextSetCharacterSpacing(context,kCGRenderingI ntentDefault);
CGContextSetRGBFillColor(context, 0, 0, 0, 1);
labelInstructions = [[UILabel alloc] initWithFrame:imagen_view2.frame];
labelInstructions.font = [UIFont systemFontOfSize: 16];
labelInstructions.lineBreakMode = UILineBreakModeWordWrap;
labelInstructions.numberOfLines = 0;
labelInstructions.backgroundColor = [UIColor clearColor];
labelInstructions.text = @"..long text string repito long text string..";
[self.view addSubview:labelInstructions];
CGImageRef imageMasked = CGBitmapContextCreateImage(context);
UIImage *resultingImage = [UIImage imageWithCGImage:imageMasked];


Any help, please?
fernan3682 is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,527
Threads: 94,047
Posts: 402,629
Top Poster: BrianSlick (7,978)
Welcome to our newest member, dreamsol01
Powered by vBadvanced CMPS v3.1.0

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