diff --git a/docs/next/image.html b/docs/next/image.html index 431b9589721..d4ee69e842c 100644 --- a/docs/next/image.html +++ b/docs/next/image.html @@ -93,11 +93,11 @@ paddingTop: 50, }, tinyLogo: { - width: 50, + width: 50, height: 50, }, logo: { - width: 66, + width: 66, height: 58, }, }); @@ -130,7 +130,7 @@ export default DisplayAnImage;
accessibleWhen true, indicates the image is an accessibility element.
+| Type | Required | Platform |
|---|---|---|
| bool | No | iOS |
accessibilityLabelThe text that's read by the screen reader when the user interacts with the image.
+| Type | Required | Platform |
|---|---|---|
| string | No | iOS |
blurRadiusblurRadius: the blur radius of the blur filter added to the image
| Type | Required | Platform |
|---|---|---|
| object: {top: number, left: number, bottom: number, right: number} | No | iOS |
defaultSourceA static image to display while loading the image source.
+| Type | Required | Platform |
|---|---|---|
| object, number | No | iOS |
| number | No | Android |
If passing an object, the general shape is {uri: string, width: number, height: number, scale: number}:
uri - a string representing the resource identifier for the image, which should be either a local file path or the name of a static image resource (which should be wrapped in the require('./path/to/image.png') function).width, height - can be specified if known at build time, in which case these will be used to set the default <Image/> component dimensions.scale - used to indicate the scale factor of the image. Defaults to 1.0 if unspecified, meaning that one image pixel equates to one display point / DIP.If passing a number:
+number - Opaque type returned by something like require('./image.jpg').++Note: On Android, the default source prop is ignored on debug builds.
+
fadeDurationAndroid only. By default, it is 300ms.
+| Type | Required | Platform |
|---|---|---|
| number | No | Android |
loadingIndicatorSourceSimilarly to source, this property represents the resource used to render the loading indicator for the image, displayed until image is ready to be displayed, typically after when it got downloaded from network.
| Type | Required |
|---|---|
| array of ImageSourcePropTypes, number | No |
++Can accept a number as returned by
+require('./image.jpg')
onErrorInvoked on load error with {nativeEvent: {error}}.
| Type | Required |
|---|---|
| function | No |
onLayoutInvoked on mount and layout changes with {nativeEvent: {layout: {x, y, width, height}}}.
onPartialLoadInvoked when a partial load of the image is complete. The definition of what constitutes a "partial load" is loader specific though this is meant for progressive JPEG loads.
+| Type | Required | Platform |
|---|---|---|
| function | No | iOS |
onProgressInvoked on download progress with {nativeEvent: {loaded, total}}.
| Type | Required | Platform |
|---|---|---|
| function | No | iOS |
progressiveRenderingEnabledAndroid only. When true, enables progressive jpeg streaming. https://frescolib.org/docs/progressive-jpegs.html
+| Type | Required | Platform |
|---|---|---|
| bool | No | Android |
resizeMethodThe mechanism that should be used to resize the image when the image's dimensions differ from the image view's dimensions. Defaults to auto.
auto: Use heuristics to pick between resize and scale.
resize: A software operation which changes the encoded image in memory before it gets decoded. This should be used instead of scale when the image is much larger than the view.
scale: The image gets drawn downscaled or upscaled. Compared to resize, scale is faster (usually hardware accelerated) and produces higher quality images. This should be used if the image is smaller than the view. It should also be used if the image is slightly bigger than the view.
More details about resize and scale can be found at http://frescolib.org/docs/resizing.html.
| Type | Required | Platform |
|---|---|---|
| enum('auto', 'resize', 'scale') | No | Android |
resizeModeDetermines how to resize the image when the frame doesn't match the raw image dimensions. Defaults to cover.
loadingIndicatorSourceSimilarly to source, this property represents the resource used to render the loading indicator for the image, displayed until image is ready to be displayed, typically after when it got downloaded from network.
| Type | Required |
|---|---|
| array of ImageSourcePropTypes, number | No |
--Can accept a number as returned by
-require('./image.jpg')
onErrorInvoked on load error with {nativeEvent: {error}}.
| Type | Required |
|---|---|
| function | No |
testIDA unique identifier for this element to be used in UI Automation testing scripts.
| string | No |
resizeMethodThe mechanism that should be used to resize the image when the image's dimensions differ from the image view's dimensions. Defaults to auto.
auto: Use heuristics to pick between resize and scale.
resize: A software operation which changes the encoded image in memory before it gets decoded. This should be used instead of scale when the image is much larger than the view.
scale: The image gets drawn downscaled or upscaled. Compared to resize, scale is faster (usually hardware accelerated) and produces higher quality images. This should be used if the image is smaller than the view. It should also be used if the image is slightly bigger than the view.
More details about resize and scale can be found at http://frescolib.org/docs/resizing.html.
| Type | Required | Platform |
|---|---|---|
| enum('auto', 'resize', 'scale') | No | Android |
accessibilityLabelThe text that's read by the screen reader when the user interacts with the image.
-| Type | Required | Platform |
|---|---|---|
| string | No | iOS |
accessibleWhen true, indicates the image is an accessibility element.
-| Type | Required | Platform |
|---|---|---|
| bool | No | iOS |
capInsetsWhen the image is resized, the corners of the size specified by capInsets will stay a fixed size, but the center content and borders of the image will be stretched. This is useful for creating resizable rounded buttons, shadows, and other resizable assets. More info in the official Apple documentation.
| Type | Required | Platform |
|---|---|---|
| object: {top: number, left: number, bottom: number, right: number} | No | iOS |
defaultSourceA static image to display while loading the image source.
-| Type | Required | Platform |
|---|---|---|
| object, number | No | iOS |
| number | No | Android |
If passing an object, the general shape is {uri: string, width: number, height: number, scale: number}:
uri - a string representing the resource identifier for the image, which should be either a local file path or the name of a static image resource (which should be wrapped in the require('./path/to/image.png') function).width, height - can be specified if known at build time, in which case these will be used to set the default <Image/> component dimensions.scale - used to indicate the scale factor of the image. Defaults to 1.0 if unspecified, meaning that one image pixel equates to one display point / DIP.If passing a number:
-number - Opaque type returned by something like require('./image.jpg').--Note: On Android, the default source prop is ignored on debug builds.
-
onPartialLoadInvoked when a partial load of the image is complete. The definition of what constitutes a "partial load" is loader specific though this is meant for progressive JPEG loads.
-| Type | Required | Platform |
|---|---|---|
| function | No | iOS |
onProgressInvoked on download progress with {nativeEvent: {loaded, total}}.
| Type | Required | Platform |
|---|---|---|
| function | No | iOS |
fadeDurationAndroid only. By default, it is 300ms.
-| Type | Required | Platform |
|---|---|---|
| number | No | Android |
progressiveRenderingEnabledAndroid only. When true, enables progressive jpeg streaming. https://frescolib.org/docs/progressive-jpegs.html
-| Type | Required | Platform |
|---|---|---|
| bool | No | Android |
getSize()Image.getSize(uri, success, [failure]);
@@ -692,7 +692,7 @@ export default DisplayAnImageWithStyle;
ImageSource is an object like { uri: '<http location || file path>' }
-