npomfret / react-native-image-tools

Image editing software powered by Abode Creative SDK for iOS and Android.
171 stars 41 forks source link

Option to edit or add photo's metadata #18

Closed koswarabilly closed 6 years ago

koswarabilly commented 6 years ago

i am using react native camera module to save photo but i am unable to save location to the image metadata, so i thought of an alternative which is editing the existing file right after saving it, i hope this package can help me

junaidsubhni commented 6 years ago

if you don't need this editing functionality then i think you are adding it as extra.

koswarabilly commented 6 years ago

@junaidsubhni what do you mean?

npomfret commented 6 years ago

@koswarabilly i'm 100% sure that react native camera lets you add gps metadata to your image

koswarabilly commented 6 years ago

@npomfret yeah i know, i tried it too but it is either the app crash when trying to add metadata or the location metadata is not added at all, i do not know if this is my fault or it is the issue of the package but this is my code

takePicture = () => {
    const options = {}
    options.location = this.state.initialPosition //initialPosition have longitude and latitude attain from geolocation
    alert(options.location.longitude)
    if (this.camera) {
      this.camera.capture({metadata: options})
        .then((data) => console.log(data))
        .catch(err => console.error(err));
    }
  }

note that the alert i received show me the correct and attained coordinate, and the camera do not show error or anything the last time i try, it just save the image without location metadata

npomfret commented 6 years ago

You need to ask this question on the react-native-camera repo.

koswarabilly commented 6 years ago

@npomfret i am sorry for being out of topic I have post this issue on there too, no one respond, there are so many people who ask the same question without getting any answer