How to use the expo-image-manipulator.FlipType function in expo-image-manipulator

To help you get started, we’ve selected a few expo-image-manipulator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wheatandcat / Peperomia / PeperomiaNative / src / components / pages / CreatePlan / Connected.tsx View on Github external
if (state.input.date) {
      const check = (props.calendars || []).find(
        calendar => calendar.date === state.input.date
      );

      if (check) {
        Alert.alert('同じ日にスケジュールが既に登録されています');
        return;
      }
    }

    let image = '';
    if (state.image) {
      const manipResult = await ImageManipulator.manipulateAsync(
        state.image,
        [{ rotate: 0 }, { flip: ImageManipulator.FlipType.Vertical }],
        { compress: 1, format: ImageManipulator.SaveFormat.PNG, base64: true }
      );

      image = manipResult.base64 || '';
    }

    db.transaction((tx: SQLite.Transaction) => {
      const item: Item = {
        title: state.input.title,
        kind: state.kind || getKind(state.input.title),
        image,
      };

      insertItem(tx, item, save);
    });
  }, [

expo-image-manipulator

Provides functions that let you manipulation images on the local file system, eg: resize, crop.

MIT
Latest version published 4 months ago

Package Health Score

89 / 100
Full package analysis