title: Parse file saving error,“”Unable to encode an unsaved parsefile in User
body: <p>I am trying to sign up a user with a picture and I keep getting the error "Unable to encode an unsaved parsefile", And when I click save again it says a user is already signing up but it never gets to parse.</p>
  
  <p>My code is as follows    </p>
  
  <pre><code>imageToBeSent = ((BitmapDrawable) image.getDrawable()).getBitmap();
  ByteArrayOutputStream stream = new ByteArrayOutputStream();
  imageToBeSent.compress(Bitmap.CompressFormat.PNG,5, stream);    
  byte[] imageRec = stream.toByteArray();
  ParseFile file = new ParseFile("profile.png", imageRec);
  
  
  file.saveInBackground();
  
  Intent fromFirstSignup = getIntent();
  ParseUser user = new ParseUser();
  user.put("Name", fromFirstSignup.getStringExtra("Name"));
  user.put("Surname", fromFirstSignup.getStringExtra("Surname"));
  user.put("Department", fromFirstSignup.getStringExtra("Department"));
  user.put("JobTitle", fromFirstSignup.getStringExtra("JobTitle"));
  user.setEmail(fromFirstSignup.getStringExtra("EmailAddress"));
  user.put("ProfilePictures", file);
  user.setUsername(usernametxt);
  user.setPassword(passwordtxt);
  
  user.signUpInBackground(new SignUpCallback() {
      public void done(ParseException e) {
          if (e == null) {
          }
      }
  }
  </code></pre>
  
  <p>The initializing of other variables may not show. I did look at the other questions similar to this but none helped with my problem. </p>