Giter VIP home page Giter VIP logo

Comments (12)

heartlandzf avatar heartlandzf commented on September 2, 2024 1

Should be Fixed now ..

from tools.

dpeddi avatar dpeddi commented on September 2, 2024

Give a try now using -f png

from tools.

edpf avatar edpf commented on September 2, 2024

Trying with - f png
Sorry, but PNGs I got are not fully decoded:

imagen

from tools.

dpeddi avatar dpeddi commented on September 2, 2024

just tested with gimp and it works correctly. What editor are you using?

from tools.

edpf avatar edpf commented on September 2, 2024

I am at work and I only have access to my linux console at home, so I am generating PNGs under linux, but viewing images in Windows. I get same results with embedded viewer, with photo app and with Paint (all of them from Microsoft). With ImageMagick Display under Windows I get the following error:

imagen

from tools.

heartlandzf avatar heartlandzf commented on September 2, 2024

The embedded decoder and others don't accept the crc..

I made some test on few pixel and it was working, but there is something to fix.

But, please, confirm if images in gimp are fully decoded

from tools.

edpf avatar edpf commented on September 2, 2024

Testing images with gimp under windows --> gimp open images but I wonder if there is a problen in the last line of each image. Look at the images compared with BMPs generated with a prevoius version of res2img.py (left images are new pngs and on the right side bmps). Last line of pixels in pngs seems to be incorrect

imagen

from tools.

JDesing avatar JDesing commented on September 2, 2024

Hi, I try to extract the BMP files with the new res2img.py but not decode them correctly

fix_bmp

from tools.

edpf avatar edpf commented on September 2, 2024

Wow! Great job! Now almost everything seems to work right ;-) Just a few comments:

  • All pngs are fully decoded and seem to be OK (I didnt try bmps, sorry).
  • When encoding them again I get the new res file with same size as original which is what I think it should be (Wonderful!!!!)
  • Finding differences between original res files and new res file I get 2 diffs (5 bytes):
  1. Version number (6th byte in res file) is not the same, I think you are reading 7th byte, so line 600 should be:
    version = ord(fileContent[5:6])
    instead of
    version = ord(fileContent[6:7])
  2. Bytes 0x11 and 0x12 in images 204 and 205 are equal to 0x00 in the raw files generated when unpacking the original res file and those bytes are equal to 0xFF in raw files generated when packing. I suppose those bytes are one of the colours of the palette but I have no idea of what happened.

Anyway, the main reason of this issue was that size of packed images was twice the size of unpacked images and that problem is solved. Sorry for being so hard testing your script, but uploading firmware files whose size is bigger than expected is a typical way of bricking devices. So I think you did a great improvement!!!!

from tools.

heartlandzf avatar heartlandzf commented on September 2, 2024

@JDesing :
Png conversion are done directly while other formats use 'imagemagick'.
Imagemagick is probably the most powerful tool I know, but the use of multiple functions produce some unexpected problems.
I don't know if we can fix other formats, but with png we have more control over the output.

@edpf:

  1. later or tomorrow I check.. I'll upload the new version with compressed png support
  2. If transparent bit is set, the first entry in colormap is .. transparent .. I choose to represent transparent color with rgb( 254, 254, 0) as first element in the png colormap. Converting to raw, if first value is (254,254,0) , transparent bit is set and the rgb value is not a problem.
    Please note that it looks like display has 8 colors and official resources only use 0 or 255 for color components.

I hope that all works well!

from tools.

JDesing avatar JDesing commented on September 2, 2024

@heartlandzf

Ok, thanks for the reply. The problem is that if I modify some PNG is not seen correctly in the Amazfit Bip, the modified PNG is seen only grabs. However, if I use the BMP and although they are not well decoded in the PC, then in the Amazfit Bip is seen correctly. I have tried several ways to save in PNG but none works for me. I will continue to use BMP.

Thanks and best regards.

from tools.

kingdj avatar kingdj commented on September 2, 2024

Hey any one knows how to design custom watchface for amazfit bip u.

from tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.