Skip to content

Commit

Permalink
Strip ICC color profile data
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkFenX committed Jul 23, 2015
1 parent cd7579a commit 8c19a95
Show file tree
Hide file tree
Showing 46 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions scripts/icons_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ def get_icon_file(request):
img.thumbnail(ICON_SIZE, Image.ANTIALIAS)
else:
img = Image.open(fullpath)
# Strip all additional image info (mostly for ICC color
# profiles, see issue #337)
img.info = {}
return img


Expand All @@ -235,7 +238,7 @@ def get_icon_file(request):
continue
fullname = 'icon{}.png'.format(fname)
fullpath = os.path.join(icons_dir, fullname)
icon.save(fullpath, 'PNG')
icon.save(fullpath, 'png')
if missing:
print(' {} icons are missing in export:'.format(len(missing)))
for fname in sorted(missing):
Expand All @@ -251,7 +254,7 @@ def get_icon_file(request):
continue
fullname = 'icon{}.png'.format(fname)
fullpath = os.path.join(icons_dir, fullname)
icon.save(fullpath, 'PNG')
icon.save(fullpath, 'png')
if missing:
print(' {} icons are missing in export:'.format(len(missing)))
for fname in sorted(missing):
Expand Down
7 changes: 5 additions & 2 deletions scripts/renders_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ def get_render(type_id):
if img.size != RENDER_SIZE:
img = crop_image(img)
img.thumbnail(RENDER_SIZE, Image.ANTIALIAS)
# Strip all additional image info (mostly for ICC color
# profiles, see issue #337)
img.info = {}
return img


Expand All @@ -99,7 +102,7 @@ def get_render(type_id):
render = get_render(type_id)
fname = '{}.png'.format(type_id)
fullpath = os.path.join(icons_dir, fname)
render.save(fullpath, 'PNG')
render.save(fullpath, 'png')
if missing:
print(' {} renders are missing in export:'.format(len(missing)))
for type_id in sorted(missing):
Expand All @@ -113,7 +116,7 @@ def get_render(type_id):
render = get_render(type_id)
fname = '{}.png'.format(type_id)
fullpath = os.path.join(icons_dir, fname)
render.save(fullpath, 'PNG')
render.save(fullpath, 'png')
if missing:
print(' {} renders are missing in export:'.format(len(missing)))
for type_id in sorted(missing):
Expand Down
Binary file modified staticdata/icons/icon01_08.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon02_11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon105_46.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon105_47.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon105_48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon105_49.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon107_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon107_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon107_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified staticdata/icons/icon108_5.png
Binary file modified staticdata/icons/icon108_6.png
Binary file modified staticdata/icons/icon108_64_22.png
Binary file modified staticdata/icons/icon108_7.png
Binary file modified staticdata/icons/icon108_8.png
Binary file modified staticdata/icons/icon113_64_1.png
Binary file modified staticdata/icons/icon113_64_2.png
Binary file modified staticdata/icons/icon113_64_3.png
Binary file modified staticdata/icons/icon118_64_7.png
Binary file modified staticdata/icons/icon119_1.png
Binary file modified staticdata/icons/icon1337_21.png
Binary file modified staticdata/icons/icon1337_22.png
Binary file modified staticdata/icons/icon34_16.png
Binary file modified staticdata/icons/iconIcon_64px_Fireworks.png
Binary file modified staticdata/icons/iconMarketIcon_16px_Amarr.png
Binary file modified staticdata/icons/iconMarketIcon_16px_Caldari.png
Binary file modified staticdata/icons/iconMarketIcon_16px_Gallente.png
Binary file modified staticdata/icons/iconMarketIcon_16px_Minmatar.png
Binary file modified staticdata/icons/iconremote_hull_repairer.png

0 comments on commit 8c19a95

Please sign in to comment.