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

Flags to customize some action when saving the image (To file or Bitmap) #71

Closed
wants to merge 2 commits into from
Closed

Conversation

Sulfkain
Copy link

@Sulfkain Sulfkain commented Jul 31, 2018

It's retrocompatible so no changes needed if you don't want that customization

Easy to add more customize tags on other lines.

That seems to fix this Issue and this PR

@burhanrashid52
Copy link
Owner

I was thinking to make SaveOption a builder pattern method which saves multiple options for saving and it will be also easy to customize and we can add more properties in future releases. Whats your take @Sulfkain?

@burhanrashid52 burhanrashid52 added the enhancement New feature or request label Aug 3, 2018
@Sulfkain
Copy link
Author

Sulfkain commented Aug 6, 2018

The code I upload, it's able to get all the options added (right now just 2 but easy expandable).
You just need to pass them with an | (or).

Something like

                 mPhotoEditor.saveAsFile(file.getAbsolutePath(), new PhotoEditor.OnSaveListener()[...], SaveOptions.DISABLE_CLEAR_ALL_VIEWS | SaveOptions.DISABLE_OPTIMIZATION_TRANSPARENCY)

That patter is the same as on many functions on Android SDK.

The builder pattern will be clearer, but I don't have too many time to dedicate on this lib.
If you prefer to improve and do a builder pattern, feel free to modify tha code ;).

@burhanrashid52
Copy link
Owner

Thanks for the PR. I am going with the Builder Pattern.

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

Successfully merging this pull request may close these issues.

None yet

3 participants