harmony 鸿蒙Image (System API)

  • 2025-06-12
  • 浏览 (5)

Image (System API)

The Image component is usually used to display images in applications.

NOTE

This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.

This topic describes only system APIs provided by the module. For details about its public APIs, see Image.

Attributes

analyzerConfig11+

analyzerConfig(config: ImageAnalyzerConfig)

Sets the type of the AI analyzer, including subject recognition and character recognition. By default, all types are supported. The type of the AI analyzer cannot be dynamically modified.

System API: This is a system API.

System capability: SystemCapability.ArkUI.ArkUI.Full

Parameters

Name Type Mandatory Description
config ImageAnalyzerConfig Yes Type of the AI analyzer.

edgeAntialiasing11+

edgeAntialiasing(value: number)

Sets the edge antialiasing for the image. This attribute applies only to an SVG image. The value range is $[0.333, 1.333]$. The value is valid up to three decimal places.

This attribute can be used to fix aliasing in SVG images on devices with PPI lower than 200, but it may compromise the performance. Exercise caution when using this attribute.

System API: This is a system API.

System capability: SystemCapability.ArkUI.ArkUI.Full

Parameters

Name Type Mandatory Description
value number Yes Edge antialiasing of the image.
Default value: $0$

pointLight11+

pointLight(value: PointLightStyle)

Sets the point light style.

System API: This is a system API.

System capability: SystemCapability.ArkUI.ArkUI.Full

Parameters

Name Type Mandatory Description
value PointLightStyle Yes Point light style.

enhancedImageQuality12+

enhancedImageQuality(imageQuality: ResolutionQuality)

Sets the image resolution for decoding the image.

This attribute does not support non-decoded image types such as SVG, PixelMap, and DrawableDescriptor.

System API: This is a system API.

System capability: SystemCapability.ArkUI.ArkUI.Full

Parameters

Name Type Mandatory Description
imageQuality ResolutionQuality Yes Image resolution used for decoding.

ResolutionQuality12+

Enumerates the image resolutions used for decoding the image.

System API: This is a system API.

System capability: SystemCapability.ArkUI.ArkUI.Full

Name Description
Low Low resolution, with moderate decoding time.
Medium Medium resolution, with moderate decoding time.
High High resolution, with long decoding time.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArcButton

harmony 鸿蒙ArcSlider

harmony 鸿蒙Chip

harmony 鸿蒙ChipGroup

harmony 鸿蒙ComposeListItem

harmony 鸿蒙ComposeTitleBar

harmony 鸿蒙advanced.Counter

harmony 鸿蒙Dialog Box (Dialog)

harmony 鸿蒙DialogV2

harmony 鸿蒙DownloadFileButton

0  赞