如何使用DeRez从iTunes.rsrc获取图像?我只想要png或标准图像文件。谢谢。
如何使用DeRez从iTunes.rsrc获取图像?我只想要png或标准图像文件。谢谢。
这工作:
DeRez -only 'PNG ' /Applications/iTunes.app/Contents/Resources/Images.rsrc -useDF > iTunes.png
然后在Python 2.x中运行此脚本(我尝试使用之间的位 /* ... */
避免解码,但它没有工作)。
for l in file('iTunes.png'):
if not l[0] == '\t':
if l.startswith('data '):
res_id = l[l.rindex('(') + 1:l.rindex(')')]
out = file(res_id + '.png', 'wb')
continue
out.write(l[l.index('"') + 1:l.index('" ')].replace(' ', '').decode('hex'))
您应该为每个资源ID获取一个PNG文件。