Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Expo camera rotation

import { manipulateAsync, FlipType, SaveFormat } from 'expo-image-manipulator';

...

const takePic = async () => {
    if (!cameraRef) return;
    
    let photo = await cameraRef.takePictureAsync();

    if (cameraType === Camera.Constants.Type.front) {
        photo = await manipulateAsync(
            photo.localUri || photo.uri,
            [
                { rotate: 180 },
                { flip: FlipType.Vertical },
            ],
            { compress: 1, format: SaveFormat.PNG }
        );
    }

    setFrontProfile(photo.uri);
};
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript js ternary operater 
Javascript :: formating decimal hours as hours and minute javascript 
Javascript :: angular 8 remove cookies 
Javascript :: react scripts for browser 
Javascript :: ABORT CONTROLLER WITH ASYNC USEEFFECT REACT 
Javascript :: react native swipe screen 
Javascript :: spread operator react 
Javascript :: what is functional programming 
Javascript :: javascript get all elements of an id 
Javascript :: ejs js 
Javascript :: datatable sAjaxSource get output 
Javascript :: how to get all scripts on a page javascript 
Javascript :: option component in react js errors 
Javascript :: juqey off click 
Javascript :: random email js 
Javascript :: react hooks example 
Javascript :: canvas draw rect dashed 
Javascript :: how to check alphabet case in javascript 
Javascript :: console log javascript 
Javascript :: loop in javascript 
Javascript :: list of states js 
Javascript :: compare string length javascript 
Javascript :: angular size of array 
Javascript :: avoiding 0 at front in javascript 
Javascript :: vue trigger function after certain time 
Javascript :: Apollo graphql fragment 
Javascript :: javascript this Inside Constructor Function 
Javascript :: js array reduce error not a function 
Javascript :: datatable buttons bootstrap 4 
Javascript :: react axios POST using async await method with super constructor parent class 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =