MCPcopy Create free account
hub / github.com/apache/fory / from_pb_image

Function from_pb_image

benchmarks/python/benchmark.py:513–521  ·  view source on GitHub ↗
(pb_obj)

Source from the content-addressed store, hash-verified

511
512
513def from_pb_image(pb_obj) -> Image:
514 title = pb_obj.title if pb_obj.HasField("title") else ""
515 return Image(
516 uri=pb_obj.uri,
517 title=title,
518 width=pb_obj.width,
519 height=pb_obj.height,
520 size=Size(pb_obj.size),
521 )
522
523
524def to_pb_media(bench_pb2, obj: Media):

Callers 1

from_pb_mediacontentFunction · 0.70

Calls 2

ImageClass · 0.70
SizeClass · 0.70

Tested by

no test coverage detected