公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ui.Thumbnail.setParams
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
设置用于生成缩略图的参数。
返回此缩略图。
用法 | 返回 |
---|
Thumbnail.setParams(params) | ui.Thumbnail |
参数 | 类型 | 详细信息 |
---|
此:ui.thumbnail | ui.Thumbnail | ui.Thumbnail 实例。 |
params | 对象 | 生成缩略图时使用的参数。
dimensions (一个数字或一对数字,格式为 WIDTHxHEIGHT)要呈现的缩略图的最大尺寸(以像素为单位)。如果只传递一个数字,则将其用作最大值,并通过按比例缩放计算另一个维度。 |
region (东、南、西、北或 GeoJSON)要渲染的图片的地理空间区域。默认情况下,为整个图片。 |
format (字符串)可以是“png”或“jpg”。 |
bands (以英文逗号分隔的字符串)以英文逗号分隔的要映射到 RGB 的波段名称列表。 |
min (以英文逗号分隔的数字)要映射到 00 的值(或每个频段一个值)。 |
max (以英文逗号分隔的数字)要映射到 FF 的值(或每个频段一个值)。 |
gain (以英文逗号分隔的数字)要映射到 00-FF 的增益(或每个频段一个增益)。 |
bias (以英文逗号分隔的数字)要映射到 00-FF 的偏移量(或每个频段一个偏移量)。 |
gamma (以英文逗号分隔的数字)伽玛校正系数(或每个频段一个系数) |
palette (以英文逗号分隔的字符串)CSS 样式颜色字符串列表(仅限单波段预览)。 |
opacity (数字)介于 0 到 1 之间的不透明度值。 |
version (数字)映像的版本号(或最新版本)。 |
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThe \u003ccode\u003eThumbnail\u003c/code\u003e class allows you to set parameters for generating thumbnails of images.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esetParams\u003c/code\u003e method is used to configure the thumbnail generation process with options like dimensions, region, format, and color adjustments, and returns the \u003ccode\u003eui.Thumbnail\u003c/code\u003e instance.\u003c/p\u003e\n"],["\u003cp\u003eYou can control the size, area, and visual appearance of the thumbnail using parameters like \u003ccode\u003edimensions\u003c/code\u003e, \u003ccode\u003eregion\u003c/code\u003e, \u003ccode\u003ebands\u003c/code\u003e, \u003ccode\u003emin\u003c/code\u003e, \u003ccode\u003emax\u003c/code\u003e, \u003ccode\u003egain\u003c/code\u003e, \u003ccode\u003ebias\u003c/code\u003e, \u003ccode\u003egamma\u003c/code\u003e, \u003ccode\u003epalette\u003c/code\u003e, and \u003ccode\u003eopacity\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt's possible to specify the image format (PNG or JPG) and opacity for the thumbnail.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eversion\u003c/code\u003e parameter lets you request a specific version of the image or the latest one.\u003c/p\u003e\n"]]],["The `Thumbnail.setParams(params)` method configures thumbnail generation parameters and returns the `ui.Thumbnail`. Parameters include `dimensions` for pixel size, `region` for the geospatial area, `format` ('png' or 'jpg'), and `bands` for RGB mapping. It accepts numerical adjustments like `min`, `max`, `gain`, `bias`, `gamma`, color settings through a `palette`, `opacity`, and `version` controls. The given `ui.thumbnail` instance is modified with these settings.\n"],null,[]]