How to create a circular crop mask for images in React Native - react-native

I've created a custom image picker using expo-media-library, and now I want to create a circular image crop mask, like on instagram or whatspp when you change the profile picture.
I found this package, https://github.com/ivpusic/react-native-image-crop-picker but it has some bugs.
Is it possible to create a custom image crop using existing react-native packages without working on native side?
Here's the packages I think could be useful:
#react-native-community/image-editor
react-native-masked-view/masked-view
Thank you

Related

Using custom gif as a loading icon within <ActivityIndicator> using react-native

I am currently attempting to code an app in react native for an android device. I have created a custom loading component and am using the to show a loading icon.
But, I want to use a custom gif loading icon that contains my app's colours. I have looked but I cannot seem to find anything, is it possible to do this?
react native does not support gif feature in its raw form. However, in order to reach what you want and use gifs in the application, you can take a look at the accepted answer on the subject;
How do I display an animated gif in React Native?
Then all you need to do is to use Image component instead of ActivityIndicator. And passing the relevant gif information to the image component.

Is there a react-native function or package for Morphing that we can apply on a photograph?

I have a question and I need to know if we can apply a morphing effect on a photograph in react native. If we can, can you help me to know how we do it and if we cannot what languages is more adapted for a mobile application?
So in fact I have to make a mobile application that allows me:
To Take or choose pictures.
To Define reference points between the two images.
To Calculate the corresponding animation.
And to Save the animation in a video or gif format.
I have already realized the classes that allows me to take a picture and to access at the gallery. (in react-native)
Without more details is hard to answer but you could try react-native-svg. Here is a link to an example Building React Native Animated Feedback UI
or reactArt Morphing SVG Paths with React Art
It would help if, when you ask, you gave more information though (e.g., the image format, what you have already tried, and research you have already conducted to look into the topic.)
Cheers!

React native Library to take bitmap

I am Working on react native camera library to taking bitmap.
For example, when we capture a image it return image path, height, width etc.
Instead of these i need bitmap.
The best way to achieve what you're looking to do is likely going to be to use the Native UI Components API for iOS and Android to implement a custom native image view that applies the effects you are looking for.
React Native doesn't give the option of accessing access the raw bitmap data of the React Native (aka. RCTImage) component.

Lottie animation on Expo

I'm using this animation in my react native Expo app:
https://www.lottiefiles.com/86-bouncy-dribbble-ball
The animation runs, I can see the shadow of the ball but I can't see the ball image.
The image is defined like this in the animation json file:
[{"id":"image_0","w":289,"h":287,"u":"images/","p":"img_0.png"}]
I put the image and the json file into the same folder. I guess Lottie can't find the image. I tried lots of different combinations for the "u" parameter but I couldn't manage to show the image.
Any help is appreciated.
https://github.com/airbnb/lottie-react-native/issues/145
I found the solution - just drag the images folder into your bundle resources in your Xcode project.

How to add custom image on native map in Titanium?

currently i am working on native map in Titanium for android and iOS.
you might have seen native maps on which a custom image layer or layout is being displayed, which will rotate and zoom according to the user input (currently i am not talking about annotations)
i have tried using annotation map tile too but it doesn't seems to work as the native map app i have seen
if you have any question or are not able to understand my question please let me know so i could clarify and get solution for one of you
Update:
Can you give a better explanation of what you've tried?
you might already know about mapbox.com and leafletjs.com, by using their library we could make customize maps and offline map in webview but i am looking for some Titanium module which could help me use native map of iOS and android for performing similar functionalities(i am avoiding commercial library and plugins as my app is not commercial app). i want to create map tiles which could be used for offline purpose as the user would have downloaded with the app.
what i have tried yet!!
1: http://i.stack.imgur.com/CLiNh.jpg
2: http://i.stack.imgur.com/QOLO7.jpg
in first image link i have given image in which i showing screenshot of map with rotation (if you notice compass) and the map tile moved accordingly to it
in 2nd image ... i had put a map tile using createAnnontation function, but unable to fix its layout remains same and it doesn't resize when i do zoom in/out too
I assume you are talking about custom tiles on top of a MapView.
There is an example module for iOS at https://github.com/benbahrenburg/benCoding.Map which used the Titanium map module as a base. It is a bit dated, but see the TileOverlay example and code and it will get you on the right track.
The best tutorial I've found on how to create the tiles is at http://www.ericbinnion.com/creating-custom-overlays-for-ios-mapkit-framework/
I've tried to create a similar TileOverlay functionality by forking the Android map module with limited success. I never got it to work as well as the native maps.
You could also check out using Mapbox with Titanium. There are great tutorials and tools for creating your own tiles layers and manipulating existing layers. Adam Paxton gave a great demo of it at TiConf in New York this year.