Get a Thumbnail for a given asset. Args: params: Parameters identical to getMapId, plus: size - (a number or pair of numbers in format WIDTHxHEIGHT) Maximum dimensions of the thumbnail to render, in pixels. If only one number is passed, it is used as the maximum, a
(
params: dict[str, Any], thumbType: str | None = None
)
| 1086 | |
| 1087 | @deprecation.Deprecated('Use getThumbId and makeThumbUrl') |
| 1088 | def getThumbnail( |
| 1089 | params: dict[str, Any], thumbType: str | None = None |
| 1090 | ) -> Any: |
| 1091 | """Get a Thumbnail for a given asset. |
| 1092 | |
| 1093 | Args: |
| 1094 | params: Parameters identical to getMapId, plus: |
| 1095 | size - (a number or pair of numbers in format WIDTHxHEIGHT) Maximum |
| 1096 | dimensions of the thumbnail to render, in pixels. If only one number |
| 1097 | is passed, it is used as the maximum, and the other dimension is |
| 1098 | computed by proportional scaling. |
| 1099 | region - (E,S,W,N or GeoJSON) Geospatial region of the image |
| 1100 | to render. By default, the whole image. |
| 1101 | format - (string) Either 'png' (default) or 'jpg'. |
| 1102 | thumbType: Thumbnail type to get. Only valid values are |
| 1103 | 'video' or 'filmstrip' otherwise the request is treated as a |
| 1104 | regular thumbnail. |
| 1105 | Returns: |
| 1106 | A thumbnail image as raw PNG data. |
| 1107 | """ |
| 1108 | thumbid = params['image'].getThumbId(params)['thumbid'] |
| 1109 | if thumbType == 'video': |
| 1110 | return _execute_cloud_call( |
| 1111 | _get_cloud_projects_raw().videoThumbnails().getPixels(name=thumbid) |
| 1112 | ) |
| 1113 | elif thumbType == 'filmstrip': |
| 1114 | return _execute_cloud_call( |
| 1115 | _get_cloud_projects_raw().filmstripThumbnails().getPixels(name=thumbid) |
| 1116 | ) |
| 1117 | else: |
| 1118 | return _execute_cloud_call( |
| 1119 | _get_cloud_projects_raw().thumbnails().getPixels(name=thumbid) |
| 1120 | ) |
| 1121 | |
| 1122 | |
| 1123 | def getThumbId( |
nothing calls this directly
no test coverage detected