Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save full resolution #11

Closed
BerkCalik opened this issue Mar 17, 2018 · 3 comments
Closed

Save full resolution #11

BerkCalik opened this issue Mar 17, 2018 · 3 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@BerkCalik
Copy link

Hi,
Can i save image with original size? As an example, the camera takes pictures at a resolution of 3264x2448. After editing the image, it is saved is the same as when the screen resolution.

I'm used load photo to editor:

void loadPhotoEditor(String filePath) {
        mPhotoEditor.clearAllViews();
        Bitmap photo = BitmapFactory.decodeFile(filePath );
        photoEditorView.getSource().setImageBitmap(photo);  
 }

and save function

@SuppressLint("MissingPermission")
    @OnClick(R.id.btnSave)
    public void onbtnEditSaveClicked() {
        progress = ProgressDialog.show(this, "İşleminiz Yapılıyor....",
                "Görsel kayıt ediliyor", true);
        mPhotoEditor.saveImage(mCurrentPhotoPath, new PhotoEditor.OnSaveListener() {
            @Override
            public void onSuccess(@NonNull String imagePath) {
                if (progress != null) {
                    progress.dismiss();
                }
                Toast.makeText(InspectionDetail_PhotoActivity.this,
                        "Değişiklikler kayıt edildi.", Toast.LENGTH_SHORT).show();
                editMode(false);
                fileAdapter.notifyDataSetChanged();
            } 
            @Override
            public void onFailure(@NonNull Exception exception) {
                if (progress != null) {
                    progress.dismiss();
                }
                Toast.makeText(InspectionDetail_PhotoActivity.this,
                        "Değişiklikler kayıt edilemedi: " + exception.getMessage(), Toast.LENGTH_SHORT).show();
                editMode(false);
            }
        });
    }
@burhanrashid52 burhanrashid52 self-assigned this Mar 19, 2018
@burhanrashid52 burhanrashid52 added the duplicate This issue or pull request already exists label Mar 19, 2018
@burhanrashid52
Copy link
Owner

duplicate to #10

Agfct added a commit to Agfct/PhotoEditor that referenced this issue Dec 12, 2018
…h-fixes

Changes needed for image filters
@Alessi42
Copy link

Alessi42 commented Jul 9, 2019

To this could a method be implemented where when setImageURI or setImageBitmap is called the passed value is stored in mPhotoEditorView and when saveImage() is called instead of using parentView.getDrawingCache(); simply the edited layers are scaled to the original image and passed when setting the PhotoEditorView and combined resulting in the original image being uncompressed with the edited layer stretched on top?

@burhanrashid52
Copy link
Owner

@Alessi42 Yes I agree with approach you mentioned. Do you have any reference or sample code which helps us to get idea of how to implement it correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants