This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun invertBitmap(bitmap: Bitmap): Bitmap { | |
return Bitmap.createBitmap(bitmap.width, bitmap.height, Bitmap.Config.ARGB_8888).apply { | |
val canvas = Canvas(this) | |
val paint = Paint() | |
val matrixGrayscale = ColorMatrix() | |
matrixGrayscale.setSaturation(0f) | |
val matrixInvert = ColorMatrix() | |
matrixInvert.set( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun getAverageLuminance(frame: Frame): Double { | |
require(frame.pixelFormat == PixelFormat.YUV) { "Unsupported pixel format. Expected YUV." } | |
var totalLuminance = 0.0 | |
val yBuffer = frame.image.planes[0].buffer | |
while (yBuffer.hasRemaining()) { | |
@Suppress("MagicNumber") | |
totalLuminance += yBuffer.get().toInt() and 0xFF | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
/********************************************************************** | |
* | |
* caesar.c | |
* Caesar's cipher algorithm | |
* Encrypts messages using Caesar's cipher. | |
* <@pedrol2b> | |
**********************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { StatusBar } from 'expo-status-bar' | |
import { useEffect, useRef, useState } from 'react' | |
import { Dimensions, StyleSheet, View } from 'react-native' | |
import { Polygon, Svg } from 'react-native-svg' | |
import { | |
Camera, | |
Templates, | |
useCameraDevice, | |
useCameraFormat, | |
useCameraPermission, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: ❌-no-repro | |
description: Reproduction not provided | |
color: FF0000 | |
- name: ⌨️ accessibility | |
description: Accessibility concerns | |
color: FFA500 | |
- name: 🤖 android | |
description: Android platform | |
color: 4BC74F | |
- name: ⚠️ breaking change |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.fontSize": 16, | |
"editor.lineHeight": 1.8, | |
"editor.fontFamily": "JetBrains Mono", | |
"editor.fontWeight": "400", | |
"editor.fontLigatures": true, | |
"editor.semanticHighlighting.enabled": false, | |
"editor.formatOnSave": true, | |
"editor.largeFileOptimizations": false, | |
"editor.suggestSelection": "first", |