Merge branch 'master' of github.com:jyapayne/PePy into python3
This commit is contained in:
commit
fb6e7587ac
1 changed files with 9 additions and 1 deletions
10
pe.py
10
pe.py
|
|
@ -1264,7 +1264,15 @@ class PEFile(Printable):
|
|||
g_entry = group_header.entries[0]
|
||||
|
||||
icon = Image.open(icon_path)
|
||||
i_data = resize(icon, (g_entry.Width.value, g_entry.Height.value), format='ico')
|
||||
width = g_entry.Width.value
|
||||
height = g_entry.Height.value
|
||||
|
||||
if width == 0:
|
||||
width = 256
|
||||
if height == 0:
|
||||
height = 256
|
||||
|
||||
i_data = resize(icon, (width, height), format='ico')
|
||||
|
||||
new_icon_size = len(i_data)
|
||||
icon_file_size = g_entry.DataSize.value+group_header.size+g_entry.size+2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue