diff --git a/ios/Classes/FIUIImageHandler.m b/ios/Classes/FIUIImageHandler.m index 45a4a98..7cdfe13 100644 --- a/ios/Classes/FIUIImageHandler.m +++ b/ios/Classes/FIUIImageHandler.m @@ -248,7 +248,7 @@ - (void)scale:(FIScaleOption *)option { return; } - UIGraphicsBeginImageContext(outImage.size); + UIGraphicsBeginImageContext(CGSizeMake(option.width, option.height)); CGContextRef ctx = UIGraphicsGetCurrentContext(); if (!ctx) { @@ -292,14 +292,14 @@ - (void)addText:(FIAddTextOption *)option { UIColor *color = [UIColor colorWithRed:(text.r / 255.0) green:(text.g / 255.0) blue:(text.b / 255.0) alpha:(text.a / 255.0)]; UIFont *font; - + if ([@"" isEqualToString: text.fontName ]){ font = [UIFont systemFontOfSize:text.fontSizePx]; }else{ font = [UIFont fontWithName:text.fontName size:text.fontSizePx]; } - + NSDictionary *attr = @{ NSFontAttributeName: font, NSForegroundColorAttributeName: color,