MCPcopy
hub / github.com/cluic/wxauto / FromFile

Method FromFile

wxauto/uiautomation.py:3120–3129  ·  view source on GitHub ↗

Load image from a file. filePath: str. Return bool, True if succeed otherwise False.

(self, filePath: str)

Source from the content-addressed store, hash-verified

3118 return self.FromHandle(handle, left, top, right, bottom)
3119
3120 def FromFile(self, filePath: str) -> bool:
3121 """
3122 Load image from a file.
3123 filePath: str.
3124 Return bool, True if succeed otherwise False.
3125 """
3126 self.Release()
3127 self._bitmap = _DllClient.instance().dll.BitmapFromFile(ctypes.c_wchar_p(filePath))
3128 self._getsize()
3129 return self._bitmap > 0
3130
3131 def ToFile(self, savePath: str) -> bool:
3132 """

Callers

nothing calls this directly

Calls 3

ReleaseMethod · 0.95
_getsizeMethod · 0.95
instanceMethod · 0.45

Tested by

no test coverage detected