amazfitbip / tools

GNU General Public License v2.0
126 stars 58 forks source link

isn't indexed or uncompressed #24

Closed wojtekadams closed 7 years ago

wojtekadams commented 7 years ago

Path to reproduce:

  1. ./res2img.py -i Mili_chaohu.res -u
  2. ./res2img.py -i Mili_chaohu.res -u -a
  3. ./res2img.py -i Mili_chaohu.res -p

Result

file is a Haumi resource file version 255 number of resources: 414 resource 94 | addr: 12333 ERROR: 94 isn't indexed or uncompressed Traceback (most recent call last): File "./res2img.py", line 663, in header_res.extend(img) TypeError: 'int' object is not iterable

git show:

aa4a3ea1c4cd24cf5a9ee7ef6981e7acfd314c42

uname -a:

Linux wojtekadams 4.4.0-92-generic #115~14.04.1-Ubuntu SMP Thu Aug 10 15:06:53 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

dpeddi commented 7 years ago

0.0.8.96?

wojtekadams commented 7 years ago

no, i tested only on 0.0.8.74 and 0.0.8.88

UPDATE: I have this same problem on 0.0.8.96

wojtekadams commented 7 years ago

Maybe it is a problem of imagemagick version or python version?

This problem appears only for modified files by parameter -a

wojtekadams commented 7 years ago

Console output for translating:

translating 94 with Sports set convert -depth 1 -alpha off -compress NONE -background black -fill white -font DejaVu-Sans -gravity center -pointsize 9 -size 87x20 label:"Sports set" _Mili_chaohu.res/094.png 2>/dev/null resource 112 | addr: 12cbf | pos on file: 1334b idx: 112 - depth 1 bpp - w: 48 - h: 11 - ??? 0

Generated files: 094.zip

dpeddi commented 7 years ago

see #13

wojtekadams commented 7 years ago

I'm pretty sure that's a convert command problem... I am using:

Version: ImageMagick 6.7.7-10 2017-07-31 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC

I generated png file from cmd line and I had this same problem

wojtekadams commented 7 years ago

After commit a18775758ff70f222ef6a9cf2352d9a69c42e71e issue is not repeatable.