Home
last modified time | relevance | path

Searched refs:blurhash (Results 1 – 25 of 61) sorted by relevance

123

/expo/apps/native-component-list/src/constants/
H A DComparisonImages.ts5 blurhash: ImageSource;
12 blurhash: {
21 blurhash: { blurhash: 'LmLg9W-oNGt7~Cs.ofWC4:RkfRR*', width: 18, height: 12 },
26 blurhash: { blurhash: 'LMBDA}MxIoV@pyM{V?WUKmV?wHoz', width: 18, height: 12 },
31 blurhash: { blurhash: 'L00000fQfQfQfQfQfQfQfQfQfQfQ', width: 18, height: 12 },
37 blurhash: {
46 blurhash: { blurhash: 'T#H{NaxuWA?wWVoLRkV?ofE3ogoJ', width: 18, height: 12 },
51 blurhash: { blurhash: 'T15#kc9urWu6aeWB00^PTKL#ogt8', width: 18, height: 12 },
71 blurhash: {
80 blurhash: {
[all …]
/expo/packages/expo-image/build/utils/blurhash/
H A DuseBlurhash.js11 export function useBlurhash(blurhash, punch = 1) { argument
16 if (!blurhash || !blurhash.uri || !isBlurhashString(blurhash.uri))
18 …const pixels = decode(blurhash.uri, blurhash?.width ?? DEFAULT_SIZE.width, blurhash?.height ?? DEF…
20 canvas.width = blurhash?.width ?? DEFAULT_SIZE.width;
21 canvas.height = blurhash?.height ?? DEFAULT_SIZE.height;
23 …const imageData = context.createImageData(blurhash?.width ?? DEFAULT_SIZE.width, blurhash?.height …
45 }, [blurhash?.uri, blurhash?.height, blurhash?.width, punch]);
H A Ddecode.js8 const validateBlurhash = (blurhash) => { argument
9 if (!blurhash || blurhash.length < 6) {
12 const sizeFlag = decode83(blurhash[0]);
15 if (blurhash.length !== 4 + 2 * numX * numY) {
19 export const isBlurhashValid = (blurhash) => { argument
21 validateBlurhash(blurhash);
45 const decode = (blurhash, width, height, punch) => { argument
46 validateBlurhash(blurhash);
48 const sizeFlag = decode83(blurhash[0]);
51 const quantisedMaximumValue = decode83(blurhash[1]);
[all …]
H A DuseBlurhash.js.map1 …blurhash/useBlurhash.tsx"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,oFAAoF;AACpF,qDAAqD;AAErD,OAAO…
H A Ddecode.d.ts1 export declare const isBlurhashValid: (blurhash: string) => {
5 declare const decode: (blurhash: string, width: number, height: number, punch?: number) => Uint8Cla…
H A Ddecode.js.map1 …blurhash/decode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAA…
/expo/packages/expo-image/src/utils/blurhash/
H A DuseBlurhash.tsx3 // https://github.com/woltapp/react-blurhash/issues/3
16 blurhash: { uri?: string; width?: number; height?: number } | undefined | null,
26 if (!blurhash || !blurhash.uri || !isBlurhashString(blurhash.uri)) return;
29 blurhash.uri,
30 blurhash?.width ?? DEFAULT_SIZE.width,
31 blurhash?.height ?? DEFAULT_SIZE.height,
36 canvas.width = blurhash?.width ?? DEFAULT_SIZE.width;
37 canvas.height = blurhash?.height ?? DEFAULT_SIZE.height;
40 blurhash?.width ?? DEFAULT_SIZE.width,
41 blurhash?.height ?? DEFAULT_SIZE.height
[all …]
H A Ddecode.ts9 const validateBlurhash = (blurhash: string) => {
10 if (!blurhash || blurhash.length < 6) {
14 const sizeFlag = decode83(blurhash[0]);
18 if (blurhash.length !== 4 + 2 * numX * numY) {
20 `blurhash length mismatch: length is ${blurhash.length} but it should be ${
29 validateBlurhash(blurhash);
59 validateBlurhash(blurhash);
63 const sizeFlag = decode83(blurhash[0]);
67 const quantisedMaximumValue = decode83(blurhash[1]);
74 const value = decode83(blurhash.substring(2, 6));
[all …]
/expo/packages/expo-image/src/utils/
H A DresolveHashString.web.tsx4 * Converts a string in blurhash format (`blurhash:/<hash>/<width>/<height>`
6 * Note: The blurhash:/ uri scheme is removed, because for backward compatibility reasons,
7 * strings without a scheme are assumed to be `blurhash` by default.
9 * @return An ImageSource representing the provided blurhash.
12 const [blurhash, width, height] = str.replace(/^blurhash:\//, '').split('/');
14 uri: blurhash,
H A DresolveHashString.tsx3 type ImageHashType = 'blurhash' | 'thumbhash';
11 …* Converts a blurhash string (`blurhash:/<hash>/<width>/<height>` or <hash>/<width>/<height>) into…
13 * @return An ImageSource representing the provided blurhash.
16 const [blurhash, width, height] = str.replace(/^blurhash:\//, '').split('/');
18 uri: hashToUri('blurhash', blurhash),
H A DresolveSources.tsx6 return /^(blurhash:\/)?[\w#$%*+,\-.:;=?@[\]^_{}|~]+(\/[\d.]+)*$/.test(str);
9 // Base64 strings will be recognized as blurhash by default (to keep compatibility),
27 if (typeof source === 'object' && (source?.blurhash || source?.thumbhash)) {
28 const { blurhash, thumbhash, ...restSource } = source;
31 : resolveBlurhashString(blurhash as string);
/expo/packages/expo-image/build/utils/
H A DresolveSources.js4 return /^(blurhash:\/)?[\w#$%*+,\-.:;=?@[\]^_{}|~]+(\/[\d.]+)*$/.test(str);
24 if (typeof source === 'object' && (source?.blurhash || source?.thumbhash)) {
25 const { blurhash, thumbhash, ...restSource } = source;
28 : resolveBlurhashString(blurhash);
H A DresolveHashString.web.js.map1 …blurhash format (`blurhash:/<hash>/<width>/<height>`\n * or <hash>/<width>/<height>) into an `Imag…
H A DresolveHashString.js.map1 …blurhash' | 'thumbhash';\n\nfunction hashToUri(type: ImageHashType, hash: string): string {\n con…
H A DresolveHashString.web.js10 const [blurhash, width, height] = str.replace(/^blurhash:\//, '').split('/');
12 uri: blurhash,
H A DresolveHashString.js11 const [blurhash, width, height] = str.replace(/^blurhash:\//, '').split('/');
13 uri: hashToUri('blurhash', blurhash),
/expo/packages/expo-image/build/web/
H A Dhooks.js13 const blurhash = useBlurhash(source);
15 resolvedSource: blurhash ?? thumbhash ?? source,
16 isImageHash: !!blurhash || !!thumbhash,
17 }), [blurhash, thumbhash]);
/expo/packages/expo-image/src/web/
H A Dhooks.ts21 const blurhash = useBlurhash(source); constant
24 resolvedSource: blurhash ?? thumbhash ?? source,
25 isImageHash: !!blurhash || !!thumbhash,
27 [blurhash, thumbhash]
/expo/docs/pages/versions/v48.0.0/sdk/
H A Dimage.mdx22 - Supports [blurhash](https://blurha.sh), a compact representation of a placeholder for an image
55 const blurhash =
64 placeholder={blurhash}
95 ## Generating a blurhash on a server
101 … files to a data buffer, and the official [`blurhash` JavaScript package](https://github.com/wolta…
103 <Terminal cmd={['$ npm install multer sharp blurhash']} />
112 // Import the encode function from the blurhash package.
113 const { encode } = require('blurhash');
122 app.post('/blurhash', upload.single('image'), async (req, res) => {
140 const blurhash = encode(data, info.width, info.height, componentX, componentY);
[all …]
/expo/docs/pages/versions/unversioned/sdk/
H A Dimage.mdx55 const blurhash =
64 placeholder={blurhash}
95 ## Generating a blurhash on a server
101 … files to a data buffer, and the official [`blurhash` JavaScript package](https://github.com/wolta…
103 <Terminal cmd={['$ npm install multer sharp blurhash']} />
112 // Import the encode function from the blurhash package.
113 const { encode } = require('blurhash');
119 …can be created that accepts an image and returns a JSON response containing the generated blurhash.
122 app.post('/blurhash', upload.single('image'), async (req, res) => {
140 const blurhash = encode(data, info.width, info.height, componentX, componentY);
[all …]
/expo/docs/pages/versions/v49.0.0/sdk/
H A Dimage.mdx55 const blurhash =
64 placeholder={blurhash}
95 ## Generating a blurhash on a server
101 … files to a data buffer, and the official [`blurhash` JavaScript package](https://github.com/wolta…
103 <Terminal cmd={['$ npm install multer sharp blurhash']} />
112 // Import the encode function from the blurhash package.
113 const { encode } = require('blurhash');
119 …can be created that accepts an image and returns a JSON response containing the generated blurhash.
122 app.post('/blurhash', upload.single('image'), async (req, res) => {
140 const blurhash = encode(data, info.width, info.height, componentX, componentY);
[all …]
/expo/packages/expo-image/android/src/main/java/expo/modules/image/blurhash/
H A DBlurhashModelLoader.kt1 package expo.modules.image.blurhash
19 val blurhash = getPath(model.uri, 0, null) { it } in handles() constant
22 BlurHashFetcher(blurhash, model.width, model.height, 1f) in handles()
/expo/apps/native-component-list/src/components/HashPlaceholdersDemo/
H A DComparisonRow.tsx9 blurhash: ImageSource;
17 blurhash,
27 placeholder={blurhash}
/expo/android/versioned-abis/expoview-abi48_0_0/src/main/java/abi48_0_0/expo/modules/image/blurhash/
H A DBlurhashModelLoader.kt1 package abi48_0_0.expo.modules.image.blurhash
19 val blurhash = getPath(model.uri, 0, null) { it } in handles() constant
22 BlurHashFetcher(blurhash, model.width, model.height, 1f) in handles()
/expo/android/versioned-abis/expoview-abi49_0_0/src/main/java/abi49_0_0/expo/modules/image/blurhash/
H A DBlurhashModelLoader.kt1 package abi49_0_0.expo.modules.image.blurhash
19 val blurhash = getPath(model.uri, 0, null) { it } in handles() constant
22 BlurHashFetcher(blurhash, model.width, model.height, 1f) in handles()

123