Load image from a file. filePath: str. Return bool, True if succeed otherwise False.
(self, filePath: str)
| 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 | """ |