Skip to content

Commit b2178fa

Browse files
committed
Reversed the parameter, turning "never_upscale" to "allow_upscale".
1 parent 5f03cf4 commit b2178fa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gimpfu_android_xdpi.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
UPSCALE_WARN_MESSAGE = '\nQuality of your application could be seriously affected when using upscaled bitmaps !'
3333

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):
3535
'''
3636
Resize and write images for all android density folders
3737
@@ -42,7 +42,7 @@ def write_xdpi(img, layer, res_folder, folder_prefix, image_basename, target_wid
4242
@param image_basename: basename of your image, ex: icon
4343
@param target_width: new width for your image
4444
@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
4646
@param image_extension: output format
4747
'''
4848

@@ -75,7 +75,7 @@ def write_xdpi(img, layer, res_folder, folder_prefix, image_basename, target_wid
7575
print('%s : %dx%d' % (folder, new_width, new_height))
7676

7777
if (new_width>new_img.width):
78-
if never_upscale:
78+
if not allow_upscale:
7979
warnings.append('Not creating resource for %s upscaled by %0.2f' %
8080
(folder, new_width/new_img.width))
8181
continue
@@ -120,7 +120,7 @@ def write_xdpi(img, layer, res_folder, folder_prefix, image_basename, target_wid
120120
(gimpfu.PF_BOOL, "x_xxhdpi", " Export xxhdpi", True),
121121
(gimpfu.PF_BOOL, "x_xxxhdpi", " Export xxxhdpi",False),
122122
#(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),
124124
(gimpfu.PF_RADIO, "image-extension", "Image Format", DEFAULT_OUTPUT_EXT, (("gif", "gif"), ("png", "png"), ("jpg", "jpg"))),
125125
],
126126
[],

0 commit comments

Comments
 (0)