31
31
32
32
UPSCALE_WARN_MESSAGE = '\n Quality of your application could be seriously affected when using upscaled bitmaps !'
33
33
34
- def write_xdpi (img , layer , res_folder , folder_prefix , image_basename , target_width , x_ldpi , x_mdpi , x_hdpi , x_xhdpi , x_xxhdpi , x_xxxhdpi , never_upscale , image_extension ):
34
+ def write_xdpi (img , layer , res_folder , folder_prefix , image_basename , target_width , x_ldpi , x_mdpi , x_hdpi , x_xhdpi , x_xxhdpi , x_xxxhdpi , allow_upscale , image_extension ):
35
35
'''
36
36
Resize and write images for all android density folders
37
37
@@ -42,7 +42,7 @@ def write_xdpi(img, layer, res_folder, folder_prefix, image_basename, target_wid
42
42
@param image_basename: basename of your image, ex: icon
43
43
@param target_width: new width for your image
44
44
@param target_dpi: reference density for your target width
45
- @param never_upscale: wether to refuse to create upscaled images
45
+ @param allow_upscale: whether to create upscaled images
46
46
@param image_extension: output format
47
47
'''
48
48
@@ -75,7 +75,7 @@ def write_xdpi(img, layer, res_folder, folder_prefix, image_basename, target_wid
75
75
print ('%s : %dx%d' % (folder , new_width , new_height ))
76
76
77
77
if (new_width > new_img .width ):
78
- if never_upscale :
78
+ if not allow_upscale :
79
79
warnings .append ('Not creating resource for %s upscaled by %0.2f' %
80
80
(folder , new_width / new_img .width ))
81
81
continue
@@ -120,7 +120,7 @@ def write_xdpi(img, layer, res_folder, folder_prefix, image_basename, target_wid
120
120
(gimpfu .PF_BOOL , "x_xxhdpi" , " Export xxhdpi" , True ),
121
121
(gimpfu .PF_BOOL , "x_xxxhdpi" , " Export xxxhdpi" ,False ),
122
122
#(gimpfu.PF_BOOL, "x_tvdpi", " Export tvdpi", False),
123
- (gimpfu .PF_BOOL , "never_upscale " , " Never create upscaled images" , True ),
123
+ (gimpfu .PF_BOOL , "allow_upscale " , " Create upscaled images" , False ),
124
124
(gimpfu .PF_RADIO , "image-extension" , "Image Format" , DEFAULT_OUTPUT_EXT , (("gif" , "gif" ), ("png" , "png" ), ("jpg" , "jpg" ))),
125
125
],
126
126
[],
0 commit comments