分页: 5 / 7

py amazfit tool

发表于 : 17 8月 2019, 20:13
afwafwafw
https://github.com/lolyinseo/py_amazfit ... ee/dev_gtr
https://github.com/ghtalpo/amazfit_verge_lite_tools

what is...
  • can pack/unpack .bin file for amazfit verge lite/gtr(original watchfaces)
what isn't...
  • 100% compatibility with amazfit_bip_tool
  • 100% compatibility with .json structures of bip
requirements
  • python3(tested on 3.7.4)
  • pillow(tested on 6.1.0)

代码: 全选

## usage
* for verge lite
  * see scripts folder
    * to unpack
      * python main.py WATCH_FACE_FILE.bin
    * to pack
      * python main.py WATCH_FACE_FILE.json
    * to convert from extracted GTR watchface(experimental BIP support also)
      * python convert.py EXTRACTED_WATCH_FACE_FOLDER
  * for windows users(experimental) : USE AT YOUR OWN RISK
    * copy & unzip amazfit_verge_lite_tools_WIN32.zip from release/win32
      * to pack
        * drag & drop WATCH_FACE_FILE.json into main/main.exe
      * to unpack
        * drag & drop WATCH_FACE_FILE.bin into main/main.exe
      * to convert from extracted GTR watchface(experimental BIP support also)
        * drag & drop EXTRACTED_WATCH_FACE_FOLDER into convert/convert.exe
* for GTR
  * to unpack
    * python main.py --gtr WATCH_FACE_FILE.bin
  * to pack
    * python main.py --gtr WATCH_FACE_FILE.json
  * for windows users(experimental) : USE AT YOUR OWN RISK
    * copy & unzip amazfit_gtr_tools_WIN32.7z from release/win32
      * to pack
        * drag & drop WATCH_FACE_FILE.json into main_gtr/main.exe
      * to unpack
        * drag & drop WATCH_FACE_FILE.bin into main_gtr/main.exe
It's a python port of Валерий Миронов's AmazfitBipTools(v.1.0.3.1) with some hacks.

Have a fun and feel free to give me some feeback.

Re: py amazfit tool

发表于 : 07 1月 2020, 17:57
Horatius80
[mention]afwafwafw[/mention] Hi, I know that the watchface is compressed, I can decompile it with GTR Watchface Editor (viewtopic.php?f=29&t=1076&start=20), but the .json after decompression and decompilation is not correct or maybe just I do not understand well the meaning of some new functions found inside ...
Anyway, I think there are new features of overlapping progress bars/circles. Until now, they have been drawn with full lines, but in this watchface (RainbowCircle) they are dashed ... how did they do this ???

Re: py amazfit tool

发表于 : 08 1月 2020, 11:37
kampanita
No, the size is behind 2Mb , 1500 Kb aprox.

Re: py amazfit tool

发表于 : 08 1月 2020, 11:39
kampanita
asoo 写了: 07 1月 2020, 15:56
kampanita 写了: 07 1月 2020, 14:25
I'm having trouble with this one.
Seems to be ok but does not get installed. I see no error but does not run at watch ( gtr-47 )

If i quit weather and weekday parts, it runs ok...


https://amazfitwatchfaces.com/gtr/view/2714
After adding "weather" and "weekday"
Your .BIN file (uncompress) size over 2M or not?
If the .BIN (uncompress) size is over 2M. It may not be able to be installed.
No the size when uncompressed is behind 2Mb, aprox 1500kb and compressed near 500kb.
It gets installed on watch, it reaches 100% of installation and you can "select" a "blank" WF, but then it goes to the stock one installed at firmware ( first wf at watch ) so it does not run.

It's something very rare.

Re: py amazfit tool

发表于 : 08 1月 2020, 15:53
asoo
kampanita 写了: 08 1月 2020, 11:39

No the size when uncompressed is behind 2Mb, aprox 1500kb and compressed near 500kb.
It gets installed on watch, it reaches 100% of installation and you can "select" a "blank" WF, but then it goes to the stock one installed at firmware ( first wf at watch ) so it does not run.
It's something very rare.
I saw you can fixed this issue already.
https://amazfitwatchfaces.com/gtr/view/2845
Congratulations

But i would like to know what the issue is.
Can you please tell me about the issue? And how did you fix it?
Thank

Re: py amazfit tool

发表于 : 09 1月 2020, 08:34
kambara
"Day" and "WeekDay" is not displayed by Amazfit GTR 42mm.

代码: 全选

    "MonthAndDay": {
      "Separate": {
        "Day": {
          "TopLeftX": 310,
          "TopLeftY": 181,
          "BottomRightX": 350,
          "BottomRightY": 201,
          "Alignment": "TopRight",
          "Spacing": -5,
          "ImageIndex": 2,
          "ImagesCount": 10
        }
      },
      "TwoDigitsDay": false
    },
    "WeekDay": {
      "X": 263,
      "Y": 186,
      "ImageIndex": 12,
      "ImagesCount": 21
    }
I tested "ImagesCount" of "WeekDay" on 7 and 21.

I think "day and weekday" no problem because it was displayed by "example_watchface" in py_amazfit_tools.
Is this json incorrect?

Re: py amazfit tool

发表于 : 09 1月 2020, 09:20
kampanita
asoo 写了: 08 1月 2020, 15:53
kampanita 写了: 08 1月 2020, 11:39

No the size when uncompressed is behind 2Mb, aprox 1500kb and compressed near 500kb.
It gets installed on watch, it reaches 100% of installation and you can "select" a "blank" WF, but then it goes to the stock one installed at firmware ( first wf at watch ) so it does not run.
It's something very rare.
I saw you can fixed this issue already.
https://amazfitwatchfaces.com/gtr/view/2845
Congratulations

But i would like to know what the issue is.
Can you please tell me about the issue? And how did you fix it?
Thank
Sincerely don't know exactly what was the problem, i'm thinking about a bad format in a png file, or something like that.
I created new weather pictures and new "day of week" pictures and recompiled again, and the problem was solved.

Thank you very much for your replys :D

In other hand, i discovered some new values in a bin ...it's been decompressed and unpacked but can not be recompiled "as it was" , when try to recompile are some "new parameters" at json file that are not understable by actual development tools ( i use python and recently SashaCX75 windows app )

Here is the json and the log. Take a look at "Goal2" and some other new parameters.

I attach .bin file also.

代码: 全选

2020-01-09 10:08:34,645 - root - DEBUG - Reading config...
2020-01-09 10:08:34,646 - root - DEBUG - t: {
  "Background": {
    "Image": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 0
    },
    "Preview": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 1
    }
  },
  "Activity": {
    "Calories": {
      "TopLeftX": 313,
      "TopLeftY": 235,
      "BottomRightX": 353,
      "BottomRightY": 257,
      "Alignment": "TopCenter",
      "Spacing": 0,
      "ImageIndex": 2,
      "ImagesCount": 10
    },
    "Pulse": {
      "TopLeftX": 212,
      "TopLeftY": 331,
      "BottomRightX": 242,
      "BottomRightY": 353,
      "Alignment": "TopCenter",
      "Spacing": 0,
      "ImageIndex": 12,
      "ImagesCount": 10
    },
    "Steps": {
      "Step": {
        "TopLeftX": 96,
        "TopLeftY": 235,
        "BottomRightX": 146,
        "BottomRightY": 257,
        "Alignment": "TopCenter",
        "Spacing": 0,
        "ImageIndex": 23,
        "ImagesCount": 10
      }
    },
    "Goal2": {
      "CenterX": 227,
      "CenterY": 323,
      "RadiusX": 61,
      "RadiusY": 61,
      "StartAngle": 0,
      "EndAngle": 360,
      "Width": 10,
      "Color": "0xFF0A1101",
      "Flatness": 180,
      "ImageIndex": 33
    },
    "NoDataImageIndex": 22,
    "Unknown17": {
      "BottomRightY": null
    },
    "StepsGoal": {
      "CenterX": 333,
      "CenterY": 227,
      "RadiusX": 61,
      "RadiusY": 61,
      "StartAngle": 0,
      "EndAngle": 360,
      "Width": 10,
      "Color": "0xFF10B0A1",
      "Flatness": 180,
      "ImageIndex": 34
    }
  },
  "StepsProgress": {
    "Circle": {
      "CenterX": 121,
      "CenterY": 227,
      "RadiusX": 61,
      "RadiusY": 61,
      "StartAngle": 0,
      "EndAngle": 360,
      "Width": 10,
      "Color": "0xFF0370A1",
      "Flatness": 180,
      "ImageIndex": 35
    },
    "ClockHand": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      }
    }
  },
  "Battery": {
    "Text": {
      "TopLeftX": 204,
      "TopLeftY": 139,
      "BottomRightX": 250,
      "BottomRightY": 161,
      "Alignment": "TopCenter",
      "Spacing": 0,
      "ImageIndex": 36,
      "ImagesCount": 10
    },
    "Unknown4": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      }
    },
    "Percent": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 46
    },
    "Scale": {
      "CenterX": 227,
      "CenterY": 131,
      "RadiusX": 61,
      "RadiusY": 61,
      "StartAngle": 0,
      "EndAngle": 360,
      "Width": 10,
      "Color": "0xFF0A1041",
      "Flatness": 180,
      "ImageIndex": 47
    }
  },
  "AnalogDialFace": {
    "Hours": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      },
      "Image": {
        "X": 13,
        "Y": 141,
        "ImageIndex": 48
      }
    },
    "Minutes": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      },
      "Image": {
        "X": 9,
        "Y": 183,
        "ImageIndex": 49
      }
    },
    "Seconds": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      },
      "Image": {
        "X": 6,
        "Y": 190,
        "ImageIndex": 50
      }
    }
  },
  "DaysProgress": {
    "AnalogMonth": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      }
    },
    "UnknownField2": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      }
    },
    "AnalogDOW": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      }
    }
  }
}
2020-01-09 10:08:34,646 - root - DEBUG - Reading referenced images from './Amazfit_RainbowCircle'
2020-01-09 10:08:34,647 - root - DEBUG - Loading resources for 2 '<class 'watchFaceParser.elements.background.Background'>'
2020-01-09 10:08:34,647 - root - DEBUG - Loading resources for 2.1 '<class 'watchFaceParser.elements.basicElements.image.Image'>'
2020-01-09 10:08:34,647 - root - DEBUG - Loading image 0...
2020-01-09 10:08:34,719 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13
2020-01-09 10:08:34,719 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 41 62526
2020-01-09 10:08:34,719 - root - DEBUG - Loading resources for 2.3 '<class 'watchFaceParser.elements.basicElements.image.Image'>'
2020-01-09 10:08:34,719 - root - DEBUG - Loading image 1...
2020-01-09 10:08:34,720 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13
2020-01-09 10:08:34,720 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 41 50218
2020-01-09 10:08:34,720 - root - DEBUG - Loading resources for 4 '<class 'watchFaceParser.elements.activity.Activity'>'
2020-01-09 10:08:34,721 - root - DEBUG - Loading resources for 4.1 '<class 'watchFaceParser.elements.basicElements.number.Number'>'
2020-01-09 10:08:34,721 - root - DEBUG - Loading image 2...
2020-01-09 10:08:34,721 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13
2020-01-09 10:08:34,721 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 41 8606
2020-01-09 10:08:34,722 - root - CRITICAL - unsupported operand type(s) for +: 'int' and 'NoneType'
Traceback (most recent call last):
  File "C:\amazfit\py_amazfit_tools-dev_gtr\program.py", line 61, in writeWatchFace
    imagesReader.process(WatchFace, watchFace)
  File "C:\amazfit\py_amazfit_tools-dev_gtr\watchFaceParser\utils\resourcesLoader.py", line 94, in process
    self.process(propertyType, propertyValue, currentPath)
  File "C:\amazfit\py_amazfit_tools-dev_gtr\watchFaceParser\utils\resourcesLoader.py", line 94, in process
    self.process(propertyType, propertyValue, currentPath)
  File "C:\amazfit\py_amazfit_tools-dev_gtr\watchFaceParser\utils\resourcesLoader.py", line 89, in process
    for i in range(lastImageIndexValue + 1, lastImageIndexValue + imagesCount):
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

Re: py amazfit tool

发表于 : 09 1月 2020, 09:29
kampanita
kambara 写了: 09 1月 2020, 08:34
"Day" and "WeekDay" is not displayed by Amazfit GTR 42mm.

代码: 全选

    "MonthAndDay": {
      "Separate": {
        "Day": {
          "TopLeftX": 310,
          "TopLeftY": 181,
          "BottomRightX": 350,
          "BottomRightY": 201,
          "Alignment": "TopRight",
          "Spacing": -5,
          "ImageIndex": 2,
          "ImagesCount": 10
        }
      },
      "TwoDigitsDay": false
    },
    "WeekDay": {
      "X": 263,
      "Y": 186,
      "ImageIndex": 12,
      "ImagesCount": 21
    }
I tested "ImagesCount" of "WeekDay" on 7 and 21.

I think "day and weekday" no problem because it was displayed by "example_watchface" in py_amazfit_tools.
Is this json incorrect?


Try adding TwoDigitsMonth parameter.

代码: 全选

{
  "Background": {
    "Image": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 0
    },
    "Preview": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 1
    }
  },
  "Date": {
    "MonthAndDay": {
      "Separate": {
        "Day": {
          "TopLeftX": 310,
          "TopLeftY": 181,
          "BottomRightX": 350,
          "BottomRightY": 201,
          "Alignment": "TopRight",
          "Spacing": -5,
          "ImageIndex": 2,
          "ImagesCount": 10
        }
      },
      "TwoDigitsMonth": false,  
      "TwoDigitsDay": false
    },
    "WeekDay": {
      "X": 263,
      "Y": 186,
      "ImageIndex": 12,
      "ImagesCount": 7
    }
  },
  "AnalogDialFace": {
    "Hours": {
      "unknown1": 0,
      "unknown2": 0,
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "unknown4": {
        "X": 0,
        "Y": 0
      },
      "CenterImage": {
        "X": 22,
        "Y": 172,
        "ImageIndex": 19
      }
    },
    "Minutes": {
      "unknown1": 0,
      "unknown2": 0,
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "unknown4": {
        "X": 0,
        "Y": 0
      },
      "CenterImage": {
        "X": 22,
        "Y": 172,
        "ImageIndex": 20
      }
    },
    "Seconds": {
      "unknown1": 0,
      "unknown2": 0,
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "unknown4": {
        "X": 0,
        "Y": 0
      },
      "CenterImage": {
        "X": 22,
        "Y": 172,
        "ImageIndex": 21
      }
    }
  }
}

Re: py amazfit tool

发表于 : 09 1月 2020, 13:48
kambara
kampanita 写了: 09 1月 2020, 09:29
kambara 写了: 09 1月 2020, 08:34
"Day" and "WeekDay" is not displayed by Amazfit GTR 42mm.

代码: 全选

    "MonthAndDay": {
      "Separate": {
        "Day": {
          "TopLeftX": 310,
          "TopLeftY": 181,
          "BottomRightX": 350,
          "BottomRightY": 201,
          "Alignment": "TopRight",
          "Spacing": -5,
          "ImageIndex": 2,
          "ImagesCount": 10
        }
      },
      "TwoDigitsDay": false
    },
    "WeekDay": {
      "X": 263,
      "Y": 186,
      "ImageIndex": 12,
      "ImagesCount": 21
    }
I tested "ImagesCount" of "WeekDay" on 7 and 21.

I think "day and weekday" no problem because it was displayed by "example_watchface" in py_amazfit_tools.
Is this json incorrect?


Try adding TwoDigitsMonth parameter.

代码: 全选

{
  "Background": {
    "Image": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 0
    },
    "Preview": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 1
    }
  },
  "Date": {
    "MonthAndDay": {
      "Separate": {
        "Day": {
          "TopLeftX": 310,
          "TopLeftY": 181,
          "BottomRightX": 350,
          "BottomRightY": 201,
          "Alignment": "TopRight",
          "Spacing": -5,
          "ImageIndex": 2,
          "ImagesCount": 10
        }
      },
      "TwoDigitsMonth": false,  
      "TwoDigitsDay": false
    },
    "WeekDay": {
      "X": 263,
      "Y": 186,
      "ImageIndex": 12,
      "ImagesCount": 7
    }
  },
  "AnalogDialFace": {
    "Hours": {
      "unknown1": 0,
      "unknown2": 0,
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "unknown4": {
        "X": 0,
        "Y": 0
      },
      "CenterImage": {
        "X": 22,
        "Y": 172,
        "ImageIndex": 19
      }
    },
    "Minutes": {
      "unknown1": 0,
      "unknown2": 0,
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "unknown4": {
        "X": 0,
        "Y": 0
      },
      "CenterImage": {
        "X": 22,
        "Y": 172,
        "ImageIndex": 20
      }
    },
    "Seconds": {
      "unknown1": 0,
      "unknown2": 0,
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "unknown4": {
        "X": 0,
        "Y": 0
      },
      "CenterImage": {
        "X": 22,
        "Y": 172,
        "ImageIndex": 21
      }
    }
  }
}
It was displayed!
I didn't display the month, so I thought json was unnecessary.

Thank you so, so much!

Re: py amazfit tool

发表于 : 09 1月 2020, 17:53
Horatius80
kampanita 写了: 09 1月 2020, 09:20

In other hand, i discovered some new values in a bin ...it's been decompressed and unpacked but can not be recompiled "as it was" , when try to recompile are some "new parameters" at json file that are not understable by actual development tools ( i use python and recently SashaCX75 windows app )

Here is the json and the log. Take a look at "Goal2" and some other new parameters.

I attach .bin file also.

代码: 全选

2020-01-09 10:08:34,645 - root - DEBUG - Reading config...
2020-01-09 10:08:34,646 - root - DEBUG - t: {
  "Background": {
    "Image": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 0
    },
    "Preview": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 1
    }
  },
  "Activity": {
    "Calories": {
      "TopLeftX": 313,
      "TopLeftY": 235,
      "BottomRightX": 353,
      "BottomRightY": 257,
      "Alignment": "TopCenter",
      "Spacing": 0,
      "ImageIndex": 2,
      "ImagesCount": 10
    },
    "Pulse": {
      "TopLeftX": 212,
      "TopLeftY": 331,
      "BottomRightX": 242,
      "BottomRightY": 353,
      "Alignment": "TopCenter",
      "Spacing": 0,
      "ImageIndex": 12,
      "ImagesCount": 10
    },
    "Steps": {
      "Step": {
        "TopLeftX": 96,
        "TopLeftY": 235,
        "BottomRightX": 146,
        "BottomRightY": 257,
        "Alignment": "TopCenter",
        "Spacing": 0,
        "ImageIndex": 23,
        "ImagesCount": 10
      }
    },
    "Goal2": {
      "CenterX": 227,
      "CenterY": 323,
      "RadiusX": 61,
      "RadiusY": 61,
      "StartAngle": 0,
      "EndAngle": 360,
      "Width": 10,
      "Color": "0xFF0A1101",
      "Flatness": 180,
      "ImageIndex": 33
    },
    "NoDataImageIndex": 22,
    "Unknown17": {
      "BottomRightY": null
    },
    "StepsGoal": {
      "CenterX": 333,
      "CenterY": 227,
      "RadiusX": 61,
      "RadiusY": 61,
      "StartAngle": 0,
      "EndAngle": 360,
      "Width": 10,
      "Color": "0xFF10B0A1",
      "Flatness": 180,
      "ImageIndex": 34
    }
  },
  "StepsProgress": {
    "Circle": {
      "CenterX": 121,
      "CenterY": 227,
      "RadiusX": 61,
      "RadiusY": 61,
      "StartAngle": 0,
      "EndAngle": 360,
      "Width": 10,
      "Color": "0xFF0370A1",
      "Flatness": 180,
      "ImageIndex": 35
    },
    "ClockHand": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      }
    }
  },
  "Battery": {
    "Text": {
      "TopLeftX": 204,
      "TopLeftY": 139,
      "BottomRightX": 250,
      "BottomRightY": 161,
      "Alignment": "TopCenter",
      "Spacing": 0,
      "ImageIndex": 36,
      "ImagesCount": 10
    },
    "Unknown4": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      }
    },
    "Percent": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 46
    },
    "Scale": {
      "CenterX": 227,
      "CenterY": 131,
      "RadiusX": 61,
      "RadiusY": 61,
      "StartAngle": 0,
      "EndAngle": 360,
      "Width": 10,
      "Color": "0xFF0A1041",
      "Flatness": 180,
      "ImageIndex": 47
    }
  },
  "AnalogDialFace": {
    "Hours": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      },
      "Image": {
        "X": 13,
        "Y": 141,
        "ImageIndex": 48
      }
    },
    "Minutes": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      },
      "Image": {
        "X": 9,
        "Y": 183,
        "ImageIndex": 49
      }
    },
    "Seconds": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      },
      "Image": {
        "X": 6,
        "Y": 190,
        "ImageIndex": 50
      }
    }
  },
  "DaysProgress": {
    "AnalogMonth": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      }
    },
    "UnknownField2": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      }
    },
    "AnalogDOW": {
      "OnlyBorder": false,
      "Color": "0x00000000",
      "CenterOffset": {
        "X": 0,
        "Y": 0
      },
      "Shape": {
        "X": 0,
        "Y": 0
      }
    }
  }
}
2020-01-09 10:08:34,646 - root - DEBUG - Reading referenced images from './Amazfit_RainbowCircle'
2020-01-09 10:08:34,647 - root - DEBUG - Loading resources for 2 '<class 'watchFaceParser.elements.background.Background'>'
2020-01-09 10:08:34,647 - root - DEBUG - Loading resources for 2.1 '<class 'watchFaceParser.elements.basicElements.image.Image'>'
2020-01-09 10:08:34,647 - root - DEBUG - Loading image 0...
2020-01-09 10:08:34,719 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13
2020-01-09 10:08:34,719 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 41 62526
2020-01-09 10:08:34,719 - root - DEBUG - Loading resources for 2.3 '<class 'watchFaceParser.elements.basicElements.image.Image'>'
2020-01-09 10:08:34,719 - root - DEBUG - Loading image 1...
2020-01-09 10:08:34,720 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13
2020-01-09 10:08:34,720 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 41 50218
2020-01-09 10:08:34,720 - root - DEBUG - Loading resources for 4 '<class 'watchFaceParser.elements.activity.Activity'>'
2020-01-09 10:08:34,721 - root - DEBUG - Loading resources for 4.1 '<class 'watchFaceParser.elements.basicElements.number.Number'>'
2020-01-09 10:08:34,721 - root - DEBUG - Loading image 2...
2020-01-09 10:08:34,721 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13
2020-01-09 10:08:34,721 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 41 8606
2020-01-09 10:08:34,722 - root - CRITICAL - unsupported operand type(s) for +: 'int' and 'NoneType'
Traceback (most recent call last):
  File "C:\amazfit\py_amazfit_tools-dev_gtr\program.py", line 61, in writeWatchFace
    imagesReader.process(WatchFace, watchFace)
  File "C:\amazfit\py_amazfit_tools-dev_gtr\watchFaceParser\utils\resourcesLoader.py", line 94, in process
    self.process(propertyType, propertyValue, currentPath)
  File "C:\amazfit\py_amazfit_tools-dev_gtr\watchFaceParser\utils\resourcesLoader.py", line 94, in process
    self.process(propertyType, propertyValue, currentPath)
  File "C:\amazfit\py_amazfit_tools-dev_gtr\watchFaceParser\utils\resourcesLoader.py", line 89, in process
    for i in range(lastImageIndexValue + 1, lastImageIndexValue + imagesCount):
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
This is the same what I try to figure out: viewtopic.php?p=3994#p3994

Re: py amazfit tool

发表于 : 10 1月 2020, 09:02
kampanita
Horatius80 写了: 09 1月 2020, 17:53

This is the same what I try to figure out: viewtopic.php?p=3994#p3994
Yes it's yours, i'm trying to figure out what things are "new" and see that "Goal2" is used for "pulse" circle.
There must be some others that have not been discovered yet. If you look at the digital stock watchface at firmware, you can see that also use images for pulse rating ( behind 80 is "0" and you see first section of graphic bar when pulse is over 90 ...etc )

So there are so other things that are not discovered or resolved yet by developers. SashaCX75's version ( 4pda.ru ) seem to pack in good manner, but still previsualization gif's are not well created.

Would like Amazfit to liberate all documentation about wf's creation, don't understand why they do not do it, their watches should become more popular for sure.

Re: py amazfit tool

发表于 : 10 1月 2020, 11:28
Horatius80
[mention]kampanita[/mention]: Yes I absolutely agree, some Watchface SDK tool from Xiaomi/Huami will be very good turn from they side... But we never know, maybe they will release something maybe mot

Re: py amazfit tool

发表于 : 15 1月 2020, 02:02
afwafwafw
Horatius80 写了: 07 1月 2020, 17:57
@afwafwafw Hi, I know that the watchface is compressed, I can decompile it with GTR Watchface Editor (viewtopic.php?f=29&t=1076&start=20), but the .json after decompression and decompilation is not correct or maybe just I do not understand well the meaning of some new functions found inside ...
Anyway, I think there are new features of overlapping progress bars/circles. Until now, they have been drawn with full lines, but in this watchface (RainbowCircle) they are dashed ... how did they do this ???
Hi [mention]Horatius80[/mention], you can see my resolution for progress circle in the latest commit that I've made.

I can unpack rainbow circle and convert it into Verge Lite. ( https://amazfitwatchfaces.com/verge-lite/view/600 )

As you can see in unpacked .JSON, roughly speaking, assign ImageIndex and encode position into Color to make new progress circle.

Regard 32bit ARGB color as Padding(always 0xFF?) + X(12bit) + Y(12bit). For example, 0xFF0D307F means (211, 127). Does it make sense?

Re: py amazfit tool

发表于 : 16 1月 2020, 00:06
hikashi
Theres issue with the masking png file of the circle progress(making circle progress with dashed line).

Changing coordinate using in the circle progress element doesnt do anything(image will still render on the same position), and changing the color element will not render the png on the watch.

Re: py amazfit tool

发表于 : 16 1月 2020, 01:14
afwafwafw
hikashi 写了: 16 1月 2020, 00:06
Theres issue with the masking png file of the circle progress(making circle progress with dashed line).

Changing coordinate using in the circle progress element doesnt do anything(image will still render on the same position), and changing the color element will not render the png on the watch.
[mention]hakashi[/mention] , hi. Thanks for the report. There's a issue with preview generation. I'll fix it later.

But it works in the watch even though preview shows incorrectly. You can test with https://amazfitwatchfaces.com/verge-lite/view/600

Re: py amazfit tool

发表于 : 16 1月 2020, 03:30
hikashi
afwafwafw 写了: 16 1月 2020, 01:14
hikashi 写了: 16 1月 2020, 00:06
Theres issue with the masking png file of the circle progress(making circle progress with dashed line).

Changing coordinate using in the circle progress element doesnt do anything(image will still render on the same position), and changing the color element will not render the png on the watch.
@hakashi , hi. Thanks for the report. There's a issue with preview generation. I'll fix it later.

But it works in the watch even though preview shows incorrectly. You can test with https://amazfitwatchfaces.com/verge-lite/view/600
Try change the coordinate. It will appear at the same place.

I believe the the attribute wasnt defined correctly.

Re: py amazfit tool

发表于 : 19 1月 2020, 08:58
Matth78
I have a problem with my watchface https://amazfitwatchfaces.com/gtr/view/3058
As soon as I add battery it will pack ok and installation is launching fine but watch failed to display new face and revert to stock.
If I add battery and remove step progress it works. It seems I can't have both step progress and battery. Any idea of what can be wrong. I don't see any difference with other watchface that are working. :-\

Re: py amazfit tool

发表于 : 19 1月 2020, 15:44
Horatius80
[mention]Matth78[/mention] chceck the final size of non compressed compiled -bin file ... fro GTR47 max size 1.95Mb for GTR42 max 1,75Mb or less ... I have the same problem
... I have all progress bars but when I try to add AM and PM indicators the size of bin is jumping from 1,85Mb to 2,65Mb (the size of the two images is 2x 500 bytes that is 0,1Mb and not 0,75Mb ???? ... ) so I absolutelly do not understand how watchface tools are working, but I thing there is some bug ...

Re: py amazfit tool

发表于 : 22 1月 2020, 09:11
kampanita
Matth78 写了: 19 1月 2020, 08:58
I have a problem with my watchface https://amazfitwatchfaces.com/gtr/view/3058
As soon as I add battery it will pack ok and installation is launching fine but watch failed to display new face and revert to stock.
If I add battery and remove step progress it works. It seems I can't have both step progress and battery. Any idea of what can be wrong. I don't see any difference with other watchface that are working. :-\
I will also add that your png files must have alpha color ( transparent ) so they must be in RGB mode and not indexed.
I had the same problem than you several times ( packed, installed, but not working at watch and this goes to stock WF )
Once it was caused by a file bigger than 2048 Bytes ( max at GTR47 )
Other time was caused by a .png file that was saved in indexed mode ( not in RGB mode ).

Re: py amazfit tool

发表于 : 23 1月 2020, 15:34
Tugas
On the official app, they released a animated watchface, can you make a way do unpack and pack again?

Re: py amazfit tool

发表于 : 30 1月 2020, 06:22
afwafwafw
Tugas 写了: 23 1月 2020, 15:34
On the official app, they released a animated watchface, can you make a way do unpack and pack again?
It's a little bit complicated. So needs days.

Re: py amazfit tool

发表于 : 30 1月 2020, 11:56
Rivero
Good Morning.
could someone help me with step by step to create watchface for verge lite?
thanks

Re: py amazfit tool

发表于 : 30 1月 2020, 15:30
Tugas
afwafwafw 写了: 30 1月 2020, 06:22
Tugas 写了: 23 1月 2020, 15:34
On the official app, they released a animated watchface, can you make a way do unpack and pack again?
It's a little bit complicated. So needs days.
Its here

Re: py amazfit tool

发表于 : 31 1月 2020, 15:46
mikussj3
Hello. where can I find the original watchface for Verge Lite? thank you in advance.

Re: py amazfit tool

发表于 : 31 1月 2020, 16:16
mikussj3
mikussj3 写了: 31 1月 2020, 15:46
Hello. where can I find the original watchface for Verge Lite? thank you in advance.
Nevermind. I found. It was easy and simple 😅

Re: py amazfit tool

发表于 : 02 2月 2020, 09:56
Matth78
Matth78 写了: 19 1月 2020, 08:58
I have a problem with my watchface https://amazfitwatchfaces.com/gtr/view/3058
As soon as I add battery it will pack ok and installation is launching fine but watch failed to display new face and revert to stock.
If I add battery and remove step progress it works. It seems I can't have both step progress and battery. Any idea of what can be wrong. I don't see any difference with other watchface that are working. :-\
At last I know what was the problem... It was using "OneLine" for MonthAndDay as soon I used "Separate" it worked.