MCPcopy Create free account
hub / github.com/facebook/chisel / _dataIsImage

Function _dataIsImage

commands/FBVisualizationCommands.py:157–166  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

155
156
157def _dataIsImage(data):
158 data = "(" + data + ")"
159
160 result = fb.evaluateExpressionValue("(id)[UIImage imageWithData:" + data + "]")
161
162 if result.GetError() is not None and str(result.GetError()) != "success":
163 return False
164 else:
165 isImage = result.GetValueAsUnsigned() != 0
166 return isImage
167
168
169def _dataIsString(data):

Callers 1

_visualizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected