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

How to fix the size of the clipping area #136

Open
Rookie131 opened this issue Jul 4, 2021 · 10 comments
Open

How to fix the size of the clipping area #136

Rookie131 opened this issue Jul 4, 2021 · 10 comments

Comments

@Rookie131
Copy link

Overview

I am using Brightroom and I find that the default crop area can be changed by the user.
I want the cropping area to be fixed in size.
How to achieve it?

Reproduce version

latest

@muukii
Copy link
Collaborator

muukii commented Jul 4, 2021

@Rookie131
Hello, thank you for using this library.
Which component are you using?
ClassicImageEditViewController or PhotosCropViewController or something else?

@Rookie131
Copy link
Author

Hi @muukii
I use PhotosCropViewController

@muukii
Copy link
Collaborator

muukii commented Jul 20, 2021

@Rookie131
Hi, sorry for being late.
In using PhotosCropViewController, you can fix the aspect ratio cropping from initializer.

just like this

var options = PhotosCropViewController.Options()
options.aspectRatioOptions = .fixed(.square)
let controller = PhotosCropViewController(..., options: options)

@Rookie131
Copy link
Author

Hi @muukii
thank you for your reply
Now I can fix the size of the crop region, but I cannot specify the specific width and height of the crop region, such as I want the crop region to be the width and height I specify

@Rookie131
Copy link
Author

@muukii
Copy link
Collaborator

muukii commented Sep 4, 2021

@Rookie131
so, you want to crop the image by specified pixel height and width exactly?

@Rookie131
Copy link
Author

@muukii
yes.
How do I use Brightroom to do this

@muukii
Copy link
Collaborator

muukii commented Sep 13, 2021

@Rookie131
Sorry, currently UI does not support cropping by specific pixel size. but render does support.

@Rookie131
Copy link
Author

Hi @muukii
Will you consider implementing it?
I really like Brightroom, but I need to specify the pixel height and width precisely.

@muukii
Copy link
Collaborator

muukii commented Sep 13, 2021

@Rookie131
not sure. currently, I don't have time to implement that especially.

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

No branches or pull requests

2 participants