Skip to content

Commit 24d21a4

Browse files
committed
2 parents 103b44b + 45e8ce9 commit 24d21a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ios/Classes/FIUIImageHandler.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ - (void)scale:(FIScaleOption *)option {
248248
return;
249249
}
250250

251-
UIGraphicsBeginImageContext(outImage.size);
251+
UIGraphicsBeginImageContext(CGSizeMake(option.width, option.height));
252252

253253
CGContextRef ctx = UIGraphicsGetCurrentContext();
254254
if (!ctx) {
@@ -292,14 +292,14 @@ - (void)addText:(FIAddTextOption *)option {
292292
UIColor *color = [UIColor colorWithRed:(text.r / 255.0) green:(text.g / 255.0) blue:(text.b / 255.0) alpha:(text.a / 255.0)];
293293

294294
UIFont *font;
295-
295+
296296
if ([@"" isEqualToString: text.fontName ]){
297297
font = [UIFont systemFontOfSize:text.fontSizePx];
298298
}else{
299299
font = [UIFont fontWithName:text.fontName size:text.fontSizePx];
300300
}
301301

302-
302+
303303
NSDictionary *attr = @{
304304
NSFontAttributeName: font,
305305
NSForegroundColorAttributeName: color,

0 commit comments

Comments
 (0)