@cf-wasm/photon
Version:
Photon library for Cloudflare workers, Next.js and Node.js.
1 lines • 167 kB
Source Map (JSON)
{"version":3,"sources":["/home/runner/work/cf-wasm/cf-wasm/packages/photon/dist/chunk-3Z6ABPDL.cjs","../src/lib/photon_rs.js","../src/photon.ts"],"names":["ptr","offset"],"mappings":"AAAA;ACAA,IAAI,IAAA;AAEJ,SAAS,oBAAA,CAAqB,GAAA,EAAK;AAC/B,EAAA,MAAM,IAAA,EAAM,IAAA,CAAK,uBAAA,CAAwB,CAAA;AACzC,EAAA,IAAA,CAAK,mBAAA,CAAoB,GAAA,CAAI,GAAA,EAAK,GAAG,CAAA;AACrC,EAAA,OAAO,GAAA;AACX;AAEA,SAAS,WAAA,CAAY,CAAA,EAAG,IAAA,EAAM;AAC1B,EAAA,IAAI;AACA,IAAA,OAAO,CAAA,CAAE,KAAA,CAAM,IAAA,EAAM,IAAI,CAAA;AAAA,EAC7B,EAAA,MAAA,CAAS,CAAA,EAAG;AACR,IAAA,MAAM,IAAA,EAAM,oBAAA,CAAqB,CAAC,CAAA;AAClC,IAAA,IAAA,CAAK,oBAAA,CAAqB,GAAG,CAAA;AAAA,EACjC;AACJ;AAEA,SAAS,UAAA,CAAW,CAAA,EAAG;AACnB,EAAA,OAAO,EAAA,IAAM,KAAA,EAAA,GAAa,EAAA,IAAM,IAAA;AACpC;AAEA,IAAM,kBAAA,EAAqB,OAAO,YAAA,IAAgB,YAAA,EAAc,IAAI,WAAA,CAAY,OAAA,EAAS,EAAE,SAAA,EAAW,IAAA,EAAM,KAAA,EAAO,KAAK,CAAC,EAAA,EAAI,EAAE,MAAA,EAAQ,CAAA,EAAA,GAAM;AAAE,EAAA,MAAM,KAAA,CAAM,2BAA2B,CAAA;AAAE,EAAE,CAAA;AAE1L,GAAA,CAAI,OAAO,YAAA,IAAgB,WAAA,EAAa;AAAE,EAAA,iBAAA,CAAkB,MAAA,CAAO,CAAA;AAAG;AAEtE,IAAI,wBAAA,EAA0B,IAAA;AAE9B,S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M,EAAA;AAEC,EAAA;AACX;AAEA;AACQ,EAAA;AAGA,EAAA;AACI,IAAA;AACE,MAAA;AACC,IAAA;AACH,MAAA;AACJ,IAAA;AACJ,EAAA;AAMM,EAAA;AAEF,EAAA;AACA,IAAA;AACJ,EAAA;AAEA,EAAA;AAEQ,EAAA;AAED,EAAA;AACX;AAGO;AD9hGK;AACA;AEx8CL;AAIP;AAQM,EAAA;AACI,IAAA;AACR,EAAA;AACK,EAAA;AACG,IAAA;AACR,EAAA;AACA,EAAA;AACA,EAAA;AACQ,IAAA;AACN,IAAA;AACO,IAAA;AACN,EAAA;AACI,EAAA;AACT;AAGW;AACL,EAAA;AACI,IAAA;AACR,EAAA;AACK,EAAA;AACG,IAAA;AACR,EAAA;AACA,EAAA;AACM,EAAA;AACN,EAAA;AACA,EAAA;AACO,EAAA;AACT;AAEW;AAEA;AAEA;AAGA;AACJ,EAAA;AACG,IAAA;AACR,EAAA;AACO,EAAA;AACT;AFy7CY;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/cf-wasm/cf-wasm/packages/photon/dist/chunk-3Z6ABPDL.cjs","sourcesContent":[null,"let wasm;\n\nfunction addToExternrefTable0(obj) {\n const idx = wasm.__externref_table_alloc();\n wasm.__wbindgen_export_2.set(idx, obj);\n return idx;\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n const idx = addToExternrefTable0(e);\n wasm.__wbindgen_exn_store(idx);\n }\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8ArrayMemory0 = null;\n\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8ArrayMemory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nlet cachedDataViewMemory0 = null;\n\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nlet cachedUint8ClampedArrayMemory0 = null;\n\nfunction getUint8ClampedArrayMemory0() {\n if (cachedUint8ClampedArrayMemory0 === null || cachedUint8ClampedArrayMemory0.byteLength === 0) {\n cachedUint8ClampedArrayMemory0 = new Uint8ClampedArray(wasm.memory.buffer);\n }\n return cachedUint8ClampedArrayMemory0;\n}\n\nfunction getClampedArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8ClampedArrayMemory0().subarray(ptr / 1, ptr / 1 + len);\n}\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches && builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n}\n/**\n * Alter a select channel by incrementing or decrementing its value by a constant.\n *\n * # Arguments\n * * `img` - A PhotonImage.\n * * `channel` - The channel you wish to alter, it should be either 0, 1 or 2,\n * representing R, G, or B respectively. (O=Red, 1=Green, 2=Blue)\n * * `amount` - The amount to increment/decrement the channel's value by for that pixel.\n * A positive value will increment/decrement the channel's value, a negative value will decrement the channel's value.\n *\n * ## Example\n *\n * ```no_run\n * // For example, to increase the Red channel for all pixels by 10:\n * use photon_rs::channels::alter_channel;\n * use photon_rs::native::{open_image};\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * alter_channel(&mut img, 0_usize, 10_i16);\n * ```\n *\n * Adds a constant to a select R, G, or B channel's value.\n *\n * ### Decrease a channel's value\n * // For example, to decrease the Green channel for all pixels by 20:\n * ```no_run\n * use photon_rs::channels::alter_channel;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * alter_channel(&mut img, 1_usize, -20_i16);\n * ```\n * **Note**: Note the use of a minus symbol when decreasing the channel.\n * @param {PhotonImage} img\n * @param {number} channel\n * @param {number} amt\n */\nexport function alter_channel(img, channel, amt) {\n _assertClass(img, PhotonImage);\n wasm.alter_channel(img.__wbg_ptr, channel, amt);\n}\n\n/**\n * Increment or decrement every pixel's Red channel by a constant.\n *\n * # Arguments\n * * `img` - A PhotonImage. See the PhotonImage struct for details.\n * * `amt` - The amount to increment or decrement the channel's value by for that pixel.\n *\n * # Example\n *\n * ```no_run\n * // For example, to increase the Red channel for all pixels by 10:\n * use photon_rs::channels::alter_red_channel;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * alter_red_channel(&mut img, 10_i16);\n * ```\n * @param {PhotonImage} photon_image\n * @param {number} amt\n */\nexport function alter_red_channel(photon_image, amt) {\n _assertClass(photon_image, PhotonImage);\n wasm.alter_red_channel(photon_image.__wbg_ptr, amt);\n}\n\n/**\n * Increment or decrement every pixel's Green channel by a constant.\n *\n * # Arguments\n * * `img` - A PhotonImage.\n * * `amt` - The amount to increment/decrement the channel's value by for that pixel.\n *\n * # Example\n *\n * ```no_run\n * // For example, to increase the Green channel for all pixels by 20:\n * use photon_rs::channels::alter_green_channel;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * alter_green_channel(&mut img, 20_i16);\n * ```\n * @param {PhotonImage} img\n * @param {number} amt\n */\nexport function alter_green_channel(img, amt) {\n _assertClass(img, PhotonImage);\n wasm.alter_green_channel(img.__wbg_ptr, amt);\n}\n\n/**\n * Increment or decrement every pixel's Blue channel by a constant.\n *\n * # Arguments\n * * `img` - A PhotonImage.\n * * `amt` - The amount to increment or decrement the channel's value by for that pixel.\n *\n * # Example\n *\n * ```no_run\n * // For example, to increase the Blue channel for all pixels by 10:\n * use photon_rs::channels::alter_blue_channel;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * alter_blue_channel(&mut img, 10_i16);\n * ```\n * @param {PhotonImage} img\n * @param {number} amt\n */\nexport function alter_blue_channel(img, amt) {\n _assertClass(img, PhotonImage);\n wasm.alter_blue_channel(img.__wbg_ptr, amt);\n}\n\n/**\n * Increment/decrement two channels' values simultaneously by adding an amt to each channel per pixel.\n *\n * # Arguments\n * * `img` - A PhotonImage.\n * * `channel1` - A usize from 0 to 2 that represents either the R, G or B channels.\n * * `amt1` - The amount to increment/decrement the channel's value by for that pixel.\n * * `channel2` -A usize from 0 to 2 that represents either the R, G or B channels.\n * * `amt2` - The amount to increment/decrement the channel's value by for that pixel.\n *\n * # Example\n *\n * ```no_run\n * // For example, to increase the values of the Red and Blue channels per pixel:\n * use photon_rs::channels::alter_two_channels;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * alter_two_channels(&mut img, 0_usize, 10_i16, 2_usize, 20_i16);\n * ```\n * @param {PhotonImage} img\n * @param {number} channel1\n * @param {number} amt1\n * @param {number} channel2\n * @param {number} amt2\n */\nexport function alter_two_channels(img, channel1, amt1, channel2, amt2) {\n _assertClass(img, PhotonImage);\n wasm.alter_two_channels(img.__wbg_ptr, channel1, amt1, channel2, amt2);\n}\n\n/**\n * Increment all 3 channels' values by adding an amt to each channel per pixel.\n *\n * # Arguments\n * * `img` - A PhotonImage.\n * * `r_amt` - The amount to increment/decrement the Red channel by.\n * * `g_amt` - The amount to increment/decrement the Green channel by.\n * * `b_amt` - The amount to increment/decrement the Blue channel by.\n *\n * # Example\n *\n * ```no_run\n * // For example, to increase the values of the Red channel by 10, the Green channel by 20,\n * // and the Blue channel by 50:\n * use photon_rs::channels::alter_channels;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * alter_channels(&mut img, 10_i16, 20_i16, 50_i16);\n * ```\n * @param {PhotonImage} img\n * @param {number} r_amt\n * @param {number} g_amt\n * @param {number} b_amt\n */\nexport function alter_channels(img, r_amt, g_amt, b_amt) {\n _assertClass(img, PhotonImage);\n wasm.alter_channels(img.__wbg_ptr, r_amt, g_amt, b_amt);\n}\n\n/**\n * Set a certain channel to zero, thus removing the channel's influence in the pixels' final rendered colour.\n *\n * # Arguments\n * * `img` - A PhotonImage.\n * * `channel` - The channel to be removed; must be a usize from 0 to 2, with 0 representing Red, 1 representing Green, and 2 representing Blue.\n * * `min_filter` - Minimum filter. Value between 0 and 255. Only remove the channel if the current pixel's channel value is less than this minimum filter. To completely\n * remove the channel, set this value to 255, to leave the channel as is, set to 0, and to set a channel to zero for a pixel whose red value is greater than 50,\n * then channel would be 0 and min_filter would be 50.\n *\n * # Example\n *\n * ```no_run\n * // For example, to remove the Red channel with a min_filter of 100:\n * use photon_rs::channels::remove_channel;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * remove_channel(&mut img, 0_usize, 100_u8);\n * ```\n * @param {PhotonImage} img\n * @param {number} channel\n * @param {number} min_filter\n */\nexport function remove_channel(img, channel, min_filter) {\n _assertClass(img, PhotonImage);\n wasm.remove_channel(img.__wbg_ptr, channel, min_filter);\n}\n\n/**\n * Remove the Red channel's influence in an image.\n *\n * # Arguments\n * * `img` - A PhotonImage.\n * * `min_filter` - Only remove the channel if the current pixel's channel value is less than this minimum filter.\n *\n * # Example\n *\n * ```no_run\n * // For example, to remove the red channel for red channel pixel values less than 50:\n * use photon_rs::channels::remove_red_channel;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * remove_red_channel(&mut img, 50_u8);\n * ```\n * @param {PhotonImage} img\n * @param {number} min_filter\n */\nexport function remove_red_channel(img, min_filter) {\n _assertClass(img, PhotonImage);\n wasm.remove_red_channel(img.__wbg_ptr, min_filter);\n}\n\n/**\n * Remove the Green channel's influence in an image.\n *\n * # Arguments\n * * `img` - A PhotonImage.\n * * `min_filter` - Only remove the channel if the current pixel's channel value is less than this minimum filter.\n *\n * # Example\n *\n * ```no_run\n * // For example, to remove the green channel for green channel pixel values less than 50:\n * use photon_rs::channels::remove_green_channel;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * remove_green_channel(&mut img, 50_u8);\n * ```\n * @param {PhotonImage} img\n * @param {number} min_filter\n */\nexport function remove_green_channel(img, min_filter) {\n _assertClass(img, PhotonImage);\n wasm.remove_green_channel(img.__wbg_ptr, min_filter);\n}\n\n/**\n * Remove the Blue channel's influence in an image.\n *\n * # Arguments\n * * `img` - A PhotonImage.\n * * `min_filter` - Only remove the channel if the current pixel's channel value is less than this minimum filter.\n *\n * # Example\n *\n * ```no_run\n * // For example, to remove the blue channel for blue channel pixel values less than 50:\n * use photon_rs::channels::remove_blue_channel;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * remove_blue_channel(&mut img, 50_u8);\n * ```\n * @param {PhotonImage} img\n * @param {number} min_filter\n */\nexport function remove_blue_channel(img, min_filter) {\n _assertClass(img, PhotonImage);\n wasm.remove_blue_channel(img.__wbg_ptr, min_filter);\n}\n\n/**\n * Swap two channels.\n *\n * # Arguments\n * * `img` - A PhotonImage.\n * * `channel1` - An index from 0 to 2, representing the Red, Green or Blue channels respectively. Red would be represented by 0, Green by 1, and Blue by 2.\n * * `channel2` - An index from 0 to 2, representing the Red, Green or Blue channels respectively. Same as above.\n *\n * # Example\n *\n * ```no_run\n * // For example, to swap the values of the Red channel with the values of the Blue channel:\n * use photon_rs::channels::swap_channels;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * swap_channels(&mut img, 0_usize, 2_usize);\n * ```\n * @param {PhotonImage} img\n * @param {number} channel1\n * @param {number} channel2\n */\nexport function swap_channels(img, channel1, channel2) {\n _assertClass(img, PhotonImage);\n wasm.swap_channels(img.__wbg_ptr, channel1, channel2);\n}\n\n/**\n * Invert RGB value of an image.\n *\n * # Arguments\n * * `photon_image` - A DynamicImage that contains a view into the image.\n * # Example\n *\n * ```no_run\n * use photon_rs::channels::invert;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * invert(&mut img);\n * ```\n * @param {PhotonImage} photon_image\n */\nexport function invert(photon_image) {\n _assertClass(photon_image, PhotonImage);\n wasm.invert(photon_image.__wbg_ptr);\n}\n\n/**\n * Selective hue rotation.\n *\n * Only rotate the hue of a pixel if its RGB values are within a specified range.\n * This function only rotates a pixel's hue to another if it is visually similar to the colour specified.\n * For example, if a user wishes all pixels that are blue to be changed to red, they can selectively specify only the blue pixels to be changed.\n * # Arguments\n * * `img` - A PhotonImage.\n * * `ref_color` - The `RGB` value of the reference color (to be compared to)\n * * `degrees` - The amount of degrees to hue rotate by.\n *\n * # Example\n *\n * ```no_run\n * // For example, to only rotate the pixels that are of RGB value RGB{20, 40, 60}:\n * use photon_rs::Rgb;\n * use photon_rs::channels::selective_hue_rotate;\n * use photon_rs::native::open_image;\n *\n * let ref_color = Rgb::new(20_u8, 40_u8, 60_u8);\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * selective_hue_rotate(&mut img, ref_color, 180_f32);\n * ```\n * @param {PhotonImage} photon_image\n * @param {Rgb} ref_color\n * @param {number} degrees\n */\nexport function selective_hue_rotate(photon_image, ref_color, degrees) {\n _assertClass(photon_image, PhotonImage);\n _assertClass(ref_color, Rgb);\n var ptr0 = ref_color.__destroy_into_raw();\n wasm.selective_hue_rotate(photon_image.__wbg_ptr, ptr0, degrees);\n}\n\n/**\n * Selectively change pixel colours which are similar to the reference colour provided.\n *\n * Similarity between two colours is calculated via the CIE76 formula.\n * Only changes the color of a pixel if its similarity to the reference colour is within the range in the algorithm.\n * For example, with this function, a user can change the color of all blue pixels by mixing them with red by 10%.\n * # Arguments\n * * `photon_image` - A PhotonImage.\n * * `ref_color` - The `RGB` value of the reference color (to be compared to)\n * * `new_color` - The `RGB` value of the new color (to be mixed with the matched pixels)\n * * `fraction` - The amount of mixing the new colour with the matched pixels\n *\n * # Example\n *\n * ```no_run\n * // For example, to only change the color of pixels that are similar to the RGB value RGB{200, 120, 30} by mixing RGB{30, 120, 200} with 25%:\n * use photon_rs::Rgb;\n * use photon_rs::channels::selective_color_convert;\n * use photon_rs::native::open_image;\n *\n * let ref_color = Rgb::new(200, 120, 30);\n * let new_color = Rgb::new(30, 120, 200);\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * selective_color_convert(&mut img, ref_color, new_color, 0.25);\n * ```\n * @param {PhotonImage} photon_image\n * @param {Rgb} ref_color\n * @param {Rgb} new_color\n * @param {number} fraction\n */\nexport function selective_color_convert(photon_image, ref_color, new_color, fraction) {\n _assertClass(photon_image, PhotonImage);\n _assertClass(ref_color, Rgb);\n var ptr0 = ref_color.__destroy_into_raw();\n _assertClass(new_color, Rgb);\n var ptr1 = new_color.__destroy_into_raw();\n wasm.selective_color_convert(photon_image.__wbg_ptr, ptr0, ptr1, fraction);\n}\n\n/**\n * Selectively lighten an image.\n *\n * Only lighten the hue of a pixel if its colour matches or is similar to the RGB colour specified.\n * For example, if a user wishes all pixels that are blue to be lightened, they can selectively specify only the blue pixels to be changed.\n * # Arguments\n * * `img` - A PhotonImage.\n * * `ref_color` - The `RGB` value of the reference color (to be compared to)\n * * `amt` - The level from 0 to 1 to lighten the hue by. Increasing by 10% would have an `amt` of 0.1\n *\n * # Example\n *\n * ```no_run\n * // For example, to only lighten the pixels that are of or similar to RGB value RGB{20, 40, 60}:\n * use photon_rs::Rgb;\n * use photon_rs::channels::selective_lighten;\n * use photon_rs::native::open_image;\n *\n * let ref_color = Rgb::new(20_u8, 40_u8, 60_u8);\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * selective_lighten(&mut img, ref_color, 0.2_f32);\n * ```\n * @param {PhotonImage} img\n * @param {Rgb} ref_color\n * @param {number} amt\n */\nexport function selective_lighten(img, ref_color, amt) {\n _assertClass(img, PhotonImage);\n _assertClass(ref_color, Rgb);\n var ptr0 = ref_color.__destroy_into_raw();\n wasm.selective_lighten(img.__wbg_ptr, ptr0, amt);\n}\n\n/**\n * Selectively desaturate pixel colours which are similar to the reference colour provided.\n *\n * Similarity between two colours is calculated via the CIE76 formula.\n * Only desaturates the hue of a pixel if its similarity to the reference colour is within the range in the algorithm.\n * For example, if a user wishes all pixels that are blue to be desaturated by 0.1, they can selectively specify only the blue pixels to be changed.\n * # Arguments\n * * `img` - A PhotonImage.\n * * `ref_color` - The `RGB` value of the reference color (to be compared to)\n * * `amt` - The amount of desaturate the colour by.\n *\n * # Example\n *\n * ```no_run\n * // For example, to only desaturate the pixels that are similar to the RGB value RGB{20, 40, 60}:\n * use photon_rs::Rgb;\n * use photon_rs::channels::selective_desaturate;\n * use photon_rs::native::open_image;\n *\n * let ref_color = Rgb::new(20_u8, 40_u8, 60_u8);\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * selective_desaturate(&mut img, ref_color, 0.1_f32);\n * ```\n * @param {PhotonImage} img\n * @param {Rgb} ref_color\n * @param {number} amt\n */\nexport function selective_desaturate(img, ref_color, amt) {\n _assertClass(img, PhotonImage);\n _assertClass(ref_color, Rgb);\n var ptr0 = ref_color.__destroy_into_raw();\n wasm.selective_desaturate(img.__wbg_ptr, ptr0, amt);\n}\n\n/**\n * Selectively saturate pixel colours which are similar to the reference colour provided.\n *\n * Similarity between two colours is calculated via the CIE76 formula.\n * Only saturates the hue of a pixel if its similarity to the reference colour is within the range in the algorithm.\n * For example, if a user wishes all pixels that are blue to have an increase in saturation by 10%, they can selectively specify only the blue pixels to be changed.\n * # Arguments\n * * `img` - A PhotonImage.\n * * `ref_color` - The `RGB` value of the reference color (to be compared to)\n * * `amt` - The amount of saturate the colour by.\n *\n * # Example\n *\n * ```no_run\n * // For example, to only increase the saturation of pixels that are similar to the RGB value RGB{20, 40, 60}:\n * use photon_rs::Rgb;\n * use photon_rs::channels::selective_saturate;\n * use photon_rs::native::open_image;\n *\n * let ref_color = Rgb::new(20_u8, 40_u8, 60_u8);\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * selective_saturate(&mut img, ref_color, 0.1_f32);\n * ```\n * @param {PhotonImage} img\n * @param {Rgb} ref_color\n * @param {number} amt\n */\nexport function selective_saturate(img, ref_color, amt) {\n _assertClass(img, PhotonImage);\n _assertClass(ref_color, Rgb);\n var ptr0 = ref_color.__destroy_into_raw();\n wasm.selective_saturate(img.__wbg_ptr, ptr0, amt);\n}\n\n/**\n * Selectively changes a pixel to greyscale if it is *not* visually similar or close to the colour specified.\n * Only changes the colour of a pixel if its RGB values are within a specified range.\n *\n * (Similarity between two colours is calculated via the CIE76 formula.)\n * For example, if a user wishes all pixels that are *NOT* blue to be displayed in greyscale, they can selectively specify only the blue pixels to be\n * kept in the photo.\n * # Arguments\n * * `img` - A PhotonImage.\n * * `ref_color` - The `RGB` value of the reference color (to be compared to)\n *\n * # Example\n *\n * ```no_run\n * // For example, to greyscale all pixels that are *not* visually similar to the RGB colour RGB{20, 40, 60}:\n * use photon_rs::Rgb;\n * use photon_rs::channels::selective_greyscale;\n * use photon_rs::native::open_image;\n *\n * let ref_color = Rgb::new(20_u8, 40_u8, 60_u8);\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * selective_greyscale(img, ref_color);\n * ```\n * @param {PhotonImage} photon_image\n * @param {Rgb} ref_color\n */\nexport function selective_greyscale(photon_image, ref_color) {\n _assertClass(photon_image, PhotonImage);\n var ptr0 = photon_image.__destroy_into_raw();\n _assertClass(ref_color, Rgb);\n var ptr1 = ref_color.__destroy_into_raw();\n wasm.selective_greyscale(ptr0, ptr1);\n}\n\n/**\n * Apply a monochrome effect of a certain colour.\n *\n * It does so by averaging the R, G, and B values of a pixel, and then adding a\n * separate value to that averaged value for each channel to produce a tint.\n * # Arguments\n * * `photon_image` - A PhotonImage.\n * * `r_offset` - The value to add to the Red channel per pixel.\n * * `g_offset` - The value to add to the Green channel per pixel.\n * * `b_offset` - The value to add to the Blue channel per pixel.\n *\n * # Example\n *\n * ```no_run\n * // For example, to apply a monochrome effect to an image:\n * use photon_rs::monochrome::monochrome;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * monochrome(&mut img, 40_u32, 50_u32, 100_u32);\n * ```\n * @param {PhotonImage} img\n * @param {number} r_offset\n * @param {number} g_offset\n * @param {number} b_offset\n */\nexport function monochrome(img, r_offset, g_offset, b_offset) {\n _assertClass(img, PhotonImage);\n wasm.monochrome(img.__wbg_ptr, r_offset, g_offset, b_offset);\n}\n\n/**\n * Convert an image to sepia.\n *\n * # Arguments\n * * `photon_image` - A PhotonImage.\n * # Example\n *\n * ```no_run\n * // For example, to sepia an image of type `PhotonImage`:\n * use photon_rs::monochrome::sepia;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * sepia(&mut img);\n * ```\n * @param {PhotonImage} img\n */\nexport function sepia(img) {\n _assertClass(img, PhotonImage);\n wasm.sepia(img.__wbg_ptr);\n}\n\n/**\n * Convert an image to grayscale using the conventional averaging algorithm.\n *\n * # Arguments\n * * `photon_image` - A PhotonImage.\n * # Example\n *\n * ```no_run\n * // For example, to convert an image of type `PhotonImage` to grayscale:\n * use photon_rs::monochrome::grayscale;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * grayscale(&mut img);\n * ```\n * @param {PhotonImage} img\n */\nexport function grayscale(img) {\n _assertClass(img, PhotonImage);\n wasm.grayscale(img.__wbg_ptr);\n}\n\n/**\n * Convert an image to grayscale with a human corrected factor, to account for human vision.\n *\n * # Arguments\n * * `photon_image` - A PhotonImage.\n * # Example\n *\n * ```no_run\n * // For example, to convert an image of type `PhotonImage` to grayscale with a human corrected factor:\n * use photon_rs::monochrome::grayscale_human_corrected;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * grayscale_human_corrected(&mut img);\n * ```\n * @param {PhotonImage} img\n */\nexport function grayscale_human_corrected(img) {\n _assertClass(img, PhotonImage);\n wasm.grayscale_human_corrected(img.__wbg_ptr);\n}\n\n/**\n * Desaturate an image by getting the min/max of each pixel's RGB values.\n *\n * # Arguments\n * * `photon_image` - A PhotonImage.\n * # Example\n *\n * ```no_run\n * // For example, to desaturate an image:\n * use photon_rs::monochrome::desaturate;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * desaturate(&mut img);\n * ```\n * @param {PhotonImage} img\n */\nexport function desaturate(img) {\n _assertClass(img, PhotonImage);\n wasm.desaturate(img.__wbg_ptr);\n}\n\n/**\n * Uses a min. decomposition algorithm to convert an image to greyscale.\n *\n * # Arguments\n * * `photon_image` - A PhotonImage.\n *\n * # Example\n *\n * ```no_run\n * // For example, to decompose an image with min decomposition:\n * use photon_rs::monochrome::decompose_min;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * decompose_min(&mut img);\n * ```\n * @param {PhotonImage} img\n */\nexport function decompose_min(img) {\n _assertClass(img, PhotonImage);\n wasm.decompose_min(img.__wbg_ptr);\n}\n\n/**\n * Uses a max. decomposition algorithm to convert an image to greyscale.\n *\n * # Arguments\n * * `photon_image` - A PhotonImage.\n *\n * # Example\n *\n * ```no_run\n * // For example, to decompose an image with max decomposition:\n * use photon_rs::monochrome::decompose_max;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * decompose_max(&mut img);\n * ```\n * @param {PhotonImage} img\n */\nexport function decompose_max(img) {\n _assertClass(img, PhotonImage);\n wasm.decompose_max(img.__wbg_ptr);\n}\n\n/**\n * Employ only a limited number of gray shades in an image.\n *\n * # Arguments\n * * `photon_image` - A PhotonImage.\n * * `num_shades` - The number of grayscale shades to be displayed in the image.\n *\n * # Example\n *\n * ```no_run\n * // For example, to limit an image to four shades of gray only:\n * use photon_rs::monochrome::grayscale_shades;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * grayscale_shades(&mut img, 4_u8);\n * ```\n * @param {PhotonImage} photon_image\n * @param {number} num_shades\n */\nexport function grayscale_shades(photon_image, num_shades) {\n _assertClass(photon_image, PhotonImage);\n wasm.grayscale_shades(photon_image.__wbg_ptr, num_shades);\n}\n\n/**\n * Convert an image to grayscale by setting a pixel's 3 RGB values to the Red channel's value.\n *\n * # Arguments\n * * `photon_image` - A PhotonImage.\n *\n * # Example\n *\n * ```no_run\n * use photon_rs::monochrome::r_grayscale;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * r_grayscale(&mut img);\n * ```\n * @param {PhotonImage} photon_image\n */\nexport function r_grayscale(photon_image) {\n _assertClass(photon_image, PhotonImage);\n wasm.r_grayscale(photon_image.__wbg_ptr);\n}\n\n/**\n * Convert an image to grayscale by setting a pixel's 3 RGB values to the Green channel's value.\n *\n * # Arguments\n * * `photon_image` - A PhotonImage.\n *\n * # Example\n *\n * ```no_run\n * use photon_rs::monochrome::g_grayscale;\n * use photon_rs::native::open_image;\n *\n * let mut img = open_image(\"img.jpg\").expect(\"File should open\");\n * g_grayscale(&mut img);\n * ```\n * @param {PhotonImage} photon_image\n */\nexport function g_grayscale(photon_image) {\n _assertClass(photon_image, PhotonImage);\n wasm.g_grayscale(photon_image.__wbg_ptr);\n}\n\n/**\n * Convert an image to grayscale by setting a pixel's 3 RGB values to the Blue channel's value.\n *\n * # Arguments\n * * `photon_image` - A PhotonImage.\n *\n * # Example\n *\n * ```no_run\n * use photon_rs::monochrome::b_gr