title: iOS Swift: Check if the selected image is different
body: <p>I've been digging around , but couldn't find any answer to this example.</p>
  
  <p>I'm creating an App, that has User Data, such as name, profile picture and so on.</p>
  
  <p>Every time the user makes changes and saves them, I update/save the changes to the web server to handle them.</p>
  
  <p>Here's where my question enters.</p>
  
  <p>Is there any way to check if the user changed his profile picture?</p>
  
  <p>The user can access the camera roll and don't change the picture, just returns to the previous 'activity' without making changes, but he can also click to change the profile picture and choose the same picture that was already set, so how can I know that the picture is the same, so I can avoid the new upload to the server, of the same image?</p>
  
  <p>Before uploading the image, I convert it to NSData, and I've checked the array of bytes generated and the first and last bytes, are most of the times the same, this because I tried to concatenate as a String to the end of the image name the last byte (as a string, for ex: ProfilePic89504e47), but I don't like this method at all.</p>