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

Crop #79

Open
sepehr1014 opened this issue Aug 14, 2018 · 15 comments
Open

Crop #79

sepehr1014 opened this issue Aug 14, 2018 · 15 comments
Labels
enhancement New feature or request

Comments

@sepehr1014
Copy link

Thank you for this awesome project. You mentioned cropping functionality is next. Is it in active development? What's the expected time frame?

@burhanrashid52 burhanrashid52 added the enhancement New feature or request label Aug 17, 2018
@burhanrashid52
Copy link
Owner

Crop selection will be added in future release. But for time being you can crop the image using CustomEffect.Builder() which is a wrapper on EffectFacotory check this link.

@sepehr1014
Copy link
Author

Thanks but having crop selection would be great. I personally think it's a must for any photo editor.

@DHosseiny
Copy link

U think when can you add this future?

@burhanrashid52
Copy link
Owner

I don't have ETA for it. Currently, my schedule is a little tight this time.
If anyone is able to do it before me than PR's are welcome

@animestanley
Copy link

would donation make this feature available :) ?

@burhanrashid52
Copy link
Owner

Donations are always welcome :) @animestanley

@burhanrashid52 burhanrashid52 pinned this issue Dec 14, 2018
@efreim
Copy link

efreim commented Sep 30, 2019

any updates about crop feature? :)

@lucianocheng
Copy link
Collaborator

If anyone is able to do it before me than PR's are welcome

@burhanrashid52 do you have an example of cropping you are using for reference?

@burhanrashid52
Copy link
Owner

@akhilakhi84
Copy link

akhilakhi84 commented Feb 1, 2020

Tried this library Android Image Cropper

Rect cropRect = imageCropView.getCropRect()
CustomEffect customEffect = new CustomEffect.Builder(EffectFactory.EFFECT_CROP)
                        .setParameter("xorigin", cropRect.left)
                        .setParameter("yorigin", cropRect.right)
                        .setParameter("width", cropRect.width())
                        .setParameter("height", cropRect.height())
                        .build();
                photoEditor.setFilterEffect(customEffect);

But its not cropping correctly. tried both imageCropView.getCropRect() and imageCropView.getCropWindowRect()

I think i need the width and height of your FilterImageView

EDIT: finally managed it to get working. But another problem is after cropping the image. the PhotoEditorView shows stretched image.

@amitkle
Copy link

amitkle commented May 25, 2020

@akhilakhi84 can you please elaborate what you did and if you managed to make it work?

This was referenced Oct 19, 2020
@lucianocheng
Copy link
Collaborator

For those following this: If your use case is to only crop the image once, before it is loaded, I was able to get this working with uCrop. The solution is blunt: Just crop the incoming image before loading it into the PhotoEditor.

The tricky part about solving this is cropping after the image has stickers, text, etc on it. All the things I've tried involve adding additional layers to the canvas, which isn't great. Also cropping with rotation is a whole other dimension. I don't have a solution I like yet.

@hafiz013
Copy link

For me if could manage get photoeditor source and implement fragment dialog to crop image and replace back the image is better.

@sahil0289
Copy link

If we can get photoeditorview source then we can crop image..After highlighting image or writing text we cannot get edited image to crop.. How to get edited image??

@mikemike396
Copy link

Any update on integrating cropping feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests