Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: imageConversion.py

Issue 5406295150559232: wrong icons parameter value in manifest.json for chrome buildtool fix. (Closed)
Patch Set: Use PIL to determine image size Created March 19, 2014, 8:50 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | packagerChrome.py » ('j') | packagerChrome.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # coding: utf-8 1 # coding: utf-8
2 2
3 # This file is part of the Adblock Plus build tools, 3 # This file is part of the Adblock Plus build tools,
4 # Copyright (C) 2006-2014 Eyeo GmbH 4 # Copyright (C) 2006-2014 Eyeo GmbH
5 # 5 #
6 # Adblock Plus is free software: you can redistribute it and/or modify 6 # Adblock Plus is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License version 3 as 7 # it under the terms of the GNU General Public License version 3 as
8 # published by the Free Software Foundation. 8 # published by the Free Software Foundation.
9 # 9 #
10 # Adblock Plus is distributed in the hope that it will be useful, 10 # Adblock Plus is distributed in the hope that it will be useful,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 for step in steps: 127 for step in steps:
128 filter, args = re.match(r'([^(]+)(?:\((.*)\))?', step).groups() 128 filter, args = re.match(r'([^(]+)(?:\((.*)\))?', step).groups()
129 args = re.split(r'\s*,\s*', args) if args else () 129 args = re.split(r'\s*,\s*', args) if args else ()
130 image = globals()['filter_' + filter](image, baseDir, *args) 130 image = globals()['filter_' + filter](image, baseDir, *args)
131 131
132 f = StringIO() 132 f = StringIO()
133 f.name = filename 133 f.name = filename
134 image.save(f) 134 image.save(f)
135 files[filename] = f.getvalue() 135 files[filename] = f.getvalue()
136
137 def getImageSize(file):
138 return Image.open(StringIO(file)).size
Wladimir Palant 2014/03/19 12:11:48 I didn't mean to actually put this code into image
saroyanm 2014/03/19 14:54:18 Got it, moved to packager.
OLDNEW
« no previous file with comments | « no previous file | packagerChrome.py » ('j') | packagerChrome.py » ('J')

Powered by Google App Engine
This is Rietveld