| /expo/apps/native-component-list/src/constants/ |
| H A D | ComparisonImages.ts | 5 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 D | useBlurhash.js | 11 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 D | decode.js | 8 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 D | useBlurhash.js.map | 1 …blurhash/useBlurhash.tsx"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,oFAAoF;AACpF,qDAAqD;AAErD,OAAO…
|
| H A D | decode.d.ts | 1 export declare const isBlurhashValid: (blurhash: string) => { 5 declare const decode: (blurhash: string, width: number, height: number, punch?: number) => Uint8Cla…
|
| H A D | decode.js.map | 1 …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 D | useBlurhash.tsx | 3 // 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 D | decode.ts | 9 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 D | resolveHashString.web.tsx | 4 * 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 D | resolveHashString.tsx | 3 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 D | resolveSources.tsx | 6 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 D | resolveSources.js | 4 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 D | resolveHashString.web.js.map | 1 …blurhash format (`blurhash:/<hash>/<width>/<height>`\n * or <hash>/<width>/<height>) into an `Imag…
|
| H A D | resolveHashString.js.map | 1 …blurhash' | 'thumbhash';\n\nfunction hashToUri(type: ImageHashType, hash: string): string {\n con…
|
| H A D | resolveHashString.web.js | 10 const [blurhash, width, height] = str.replace(/^blurhash:\//, '').split('/'); 12 uri: blurhash,
|
| H A D | resolveHashString.js | 11 const [blurhash, width, height] = str.replace(/^blurhash:\//, '').split('/'); 13 uri: hashToUri('blurhash', blurhash),
|
| /expo/packages/expo-image/build/web/ |
| H A D | hooks.js | 13 const blurhash = useBlurhash(source); 15 resolvedSource: blurhash ?? thumbhash ?? source, 16 isImageHash: !!blurhash || !!thumbhash, 17 }), [blurhash, thumbhash]);
|
| /expo/packages/expo-image/src/web/ |
| H A D | hooks.ts | 21 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 D | image.mdx | 22 - 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 D | image.mdx | 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'); 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 D | image.mdx | 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'); 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 D | BlurhashModelLoader.kt | 1 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 D | ComparisonRow.tsx | 9 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 D | BlurhashModelLoader.kt | 1 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 D | BlurhashModelLoader.kt | 1 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()
|