Don't include 2x version of icons that don't have a larger version.
|
Before Width: | Height: | Size: 773 B |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 787 B |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 602 B |
|
Before Width: | Height: | Size: 462 B |
|
Before Width: | Height: | Size: 730 B |
|
Before Width: | Height: | Size: 638 B |
|
Before Width: | Height: | Size: 494 B |
@@ -150,6 +150,11 @@ def get_icon_file(res_path, size):
|
||||
if not os.path.isfile(fullpath):
|
||||
return None
|
||||
img = Image.open(fullpath)
|
||||
|
||||
if size > img.size:
|
||||
# if we are requesting a size that is bigger than the source, return None. See #1769
|
||||
return None
|
||||
|
||||
img = crop_image(img)
|
||||
img.thumbnail(size, Image.ANTIALIAS)
|
||||
|
||||
|
||||