iamutkarshtiwari / Ananas

An easy image editor integration for your Android apps.
MIT License
249 stars 112 forks source link

Set the brush to lower size #64

Open james04gr opened 3 years ago

james04gr commented 3 years ago

I want to open the Editor and have the brush functionality but i want to use a lower size as a default. Is there any way to do this?

james04gr commented 3 years ago

Just a reminder in case you didn t see it!

thirstycoda commented 3 years ago

This isn't my library but I thought I'd take a little look.

It looks like the default brush size is hardcoded here:

https://github.com/iamutkarshtiwari/Ananas/blob/f943c61a3bcc57b5079f434a078573c69f7cd240/ananas/src/main/java/iamutkarshtiwari/github/io/ananas/editimage/fragment/paint/PaintFragment.java#L40

This means you have a few options:

  1. Fork the library and change the hardcoded value to whatever you want
  2. Fork the library and add a configurable default brush size then create a pull request so others can benefit from it
  3. Use https://github.com/burhanrashid52/PhotoEditor instead although that library doesn't have a crop feature which is the only reason I didn't use that library instead of this one
iamutkarshtiwari commented 3 years ago

@thirstycoda The default value of the brush size is indeed hardcoded. However, it's possible to change the brush size from the interface I provided in Paint mode (the gear icon on tap left)

@james04gr Please refer to the demo video below on how to change the brush size.

https://user-images.githubusercontent.com/6258810/123901987-ab24e180-d989-11eb-9131-bd49dd07797a.mp4