开发者

How to get images from iTunes.rsrc using DeRez?

开发者 https://www.devze.com 2023-02-12 04:44 出处:网络
How do I get images from iTunes.rsrc using DeRez? I just want png 开发者_Go百科or standard image files. Thanks.This worked:

How do I get images from iTunes.rsrc using DeRez? I just want png 开发者_Go百科or standard image files. Thanks.


This worked:

DeRez -only 'PNG ' /Applications/iTunes.app/Contents/Resources/Images.rsrc -useDF > iTunes.png

Then run this script in Python 2.x (I tried using the bits between the /* ... */ to avoid decoding, but it didn't work).

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'))

You should get one PNG file per resource ID.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号