• Administrator
  •  
    Support Ukraine
    If you experience any problems with the forum (it is not visible, there is no way to post messages, or some functionality does not work), please let us know. If you have problems with registration or you did not receive confirmation letter, let us know and we will activate your account manually.
    If you get an "The submitted form was invalid. Try submitting again" error, delete cookies, then try again.
     

py amazfit tool

This forum is designed to discuss and develop tools creating watch faces.

Moderators: asoo, lvpokka, Internal error, Watchmens

Forum rules
All communication in this branch should only be in English.
To discuss tools that are not in this section, use the “Watchfaces tools (discussion)” forum.
afwafwafw
Posts: 32
Joined: 21 Feb 2019, 02:55
Location: on earth
Has thanked: 6 times
Been thanked: 14 times
Contact:

py amazfit tool

Post by 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)

Code: Select all

## 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.
Horatius80

Post by 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 ???
kampanita
WF maker
Posts: 34
Joined: 25 Oct 2019, 06:15
Has thanked: 8 times
Been thanked: 7 times
Contact:

Post by kampanita »

No, the size is behind 2Mb , 1500 Kb aprox.
kampanita
WF maker
Posts: 34
Joined: 25 Oct 2019, 06:15
Has thanked: 8 times
Been thanked: 7 times
Contact:

Post by kampanita »

asoo wrote: 07 Jan 2020, 15:56
kampanita wrote: 07 Jan 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.
User avatar
asoo
Posts: 2109
Joined: 03 Jan 2019, 01:48
Location: ͼͽ Thailand ͼͽ
Has thanked: 404 times
Been thanked: 2023 times

Post by asoo »

kampanita wrote: 08 Jan 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
ͼͽ To request please use the interrelated forum in action ͼͽ
Please do not PM to me for requests ported watchface.
kambara
WF maker
Posts: 2
Joined: 15 Dec 2019, 04:35
Contact:

Post by kambara »

"Day" and "WeekDay" is not displayed by Amazfit GTR 42mm.

Code: Select all

    "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?
Attachments
Amazfit_imas.zip
Amazfit GTR 42mm bin
(95.27 KiB) Downloaded 290 times
kampanita
WF maker
Posts: 34
Joined: 25 Oct 2019, 06:15
Has thanked: 8 times
Been thanked: 7 times
Contact:

Post by kampanita »

asoo wrote: 08 Jan 2020, 15:53
kampanita wrote: 08 Jan 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.

Code: Select all

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'
Attachments
Amazfit_RainbowCircle.bin
(209.67 KiB) Downloaded 319 times
kampanita
WF maker
Posts: 34
Joined: 25 Oct 2019, 06:15
Has thanked: 8 times
Been thanked: 7 times
Contact:

Post by kampanita »

kambara wrote: 09 Jan 2020, 08:34
"Day" and "WeekDay" is not displayed by Amazfit GTR 42mm.

Code: Select all

    "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.

Code: Select all

{
  "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
      }
    }
  }
}
kambara
WF maker
Posts: 2
Joined: 15 Dec 2019, 04:35
Contact:

Post by kambara »

kampanita wrote: 09 Jan 2020, 09:29
kambara wrote: 09 Jan 2020, 08:34
"Day" and "WeekDay" is not displayed by Amazfit GTR 42mm.

Code: Select all

    "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.

Code: Select all

{
  "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!
Horatius80

Post by Horatius80 »

kampanita wrote: 09 Jan 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.

Code: Select all

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
kampanita
WF maker
Posts: 34
Joined: 25 Oct 2019, 06:15
Has thanked: 8 times
Been thanked: 7 times
Contact:

Post by kampanita »

Horatius80 wrote: 09 Jan 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.
Horatius80

Post by 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
afwafwafw
Posts: 32
Joined: 21 Feb 2019, 02:55
Location: on earth
Has thanked: 6 times
Been thanked: 14 times
Contact:

Post by afwafwafw »

Horatius80 wrote: 07 Jan 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?
hikashi
WF maker
Posts: 16
Joined: 18 Nov 2019, 14:48
Has thanked: 1 time
Been thanked: 14 times
Contact:

Post by 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.
afwafwafw
Posts: 32
Joined: 21 Feb 2019, 02:55
Location: on earth
Has thanked: 6 times
Been thanked: 14 times
Contact:

Post by afwafwafw »

hikashi wrote: 16 Jan 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
hikashi
WF maker
Posts: 16
Joined: 18 Nov 2019, 14:48
Has thanked: 1 time
Been thanked: 14 times
Contact:

Post by hikashi »

afwafwafw wrote: 16 Jan 2020, 01:14
hikashi wrote: 16 Jan 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.
Matth78
WF maker
Posts: 4
Joined: 31 Dec 2019, 12:24
Location: France
Has thanked: 1 time
Contact:

Post by 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. :-\
Horatius80

Post by 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 ...
kampanita
WF maker
Posts: 34
Joined: 25 Oct 2019, 06:15
Has thanked: 8 times
Been thanked: 7 times
Contact:

Post by kampanita »

Matth78 wrote: 19 Jan 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 ).
Tugas
WF maker
Posts: 17
Joined: 30 Nov 2019, 21:09
Has thanked: 7 times
Been thanked: 3 times
Contact:

Post by Tugas »

On the official app, they released a animated watchface, can you make a way do unpack and pack again?
Attachments
382057225cafa13aad367d7eaa869dd8.bin
(328.52 KiB) Downloaded 347 times
2f63262cecf30922ef6cd474bedfa71c.png
2f63262cecf30922ef6cd474bedfa71c.png (136.76 KiB) Viewed 127850 times
afwafwafw
Posts: 32
Joined: 21 Feb 2019, 02:55
Location: on earth
Has thanked: 6 times
Been thanked: 14 times
Contact:

Post by afwafwafw »

Tugas wrote: 23 Jan 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.
Rivero
Posts: 3
Joined: 26 Jan 2020, 22:20
Location: Rio de Janeiro
Contact:

Post by Rivero »

Good Morning.
could someone help me with step by step to create watchface for verge lite?
thanks
Tugas
WF maker
Posts: 17
Joined: 30 Nov 2019, 21:09
Has thanked: 7 times
Been thanked: 3 times
Contact:

Post by Tugas »

afwafwafw wrote: 30 Jan 2020, 06:22
Tugas wrote: 23 Jan 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
Attachments
WatchFace_PackUnpack_v1.2.zip
(902.86 KiB) Downloaded 483 times
mikussj3
WF maker
Posts: 2
Joined: 28 Jan 2020, 16:47
Location: Poland
Contact:

Post by mikussj3 »

Hello. where can I find the original watchface for Verge Lite? thank you in advance.
mikussj3
WF maker
Posts: 2
Joined: 28 Jan 2020, 16:47
Location: Poland
Contact:

Post by mikussj3 »

mikussj3 wrote: 31 Jan 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 😅
Matth78
WF maker
Posts: 4
Joined: 31 Dec 2019, 12:24
Location: France
Has thanked: 1 time
Contact:

Post by Matth78 »

Matth78 wrote: 19 Jan 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.
Post Reply

Return to “Watchfaces tools”

Who is online

Users browsing this forum: No registered users and 3 guests