burhanrashid52 / PhotoEditor

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
MIT License
4.07k stars 981 forks source link

Cannot Resolve Symbol 'OnSaveBitmap' #194

Open yusrilmr opened 4 years ago

yusrilmr commented 4 years ago

There is a small mistake in the wiki, particularly in Saving part: https://github.com/burhanrashid52/PhotoEditor/wiki/Saving

Current code:

mPhotoEditor.saveAsBitmap(new PhotoEditor.OnSaveBitmap() {
                  @Override
                  public void onBitmapReady(@NonNull Bitmap saveBitmap) {
                     Log.e("PhotoEditor","Image Saved Successfully");
                  }

                  @Override
                  public void onFailure(@NonNull Exception exception) {
                      Log.e("PhotoEditor","Failed to save Image");
                  }
              });

It should be:

mPhotoEditor.saveAsBitmap(new OnSaveBitmap() {
            @Override
            public void onBitmapReady(@NonNull Bitmap saveBitmap) {
            }

            @Override
            public void onFailure(@NonNull Exception exception) {
            }
        });

If we still use PhotoEditor.OnSaveBitmap, it shows Cannot Resolve Symbol 'OnSaveBitmap'

Sambal-Srivastava commented 2 years ago

It is still not able to create the bitmap. Did this work for anyone?