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 save the cropped bytes as a file? #71

Open
jubayerhossain625 opened this issue Mar 1, 2024 · 1 comment
Open

How to save the cropped bytes as a file? #71

jubayerhossain625 opened this issue Mar 1, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jubayerhossain625
Copy link

No description provided.

@quoc-huynh-cosee quoc-huynh-cosee self-assigned this Mar 2, 2024
@quoc-huynh-cosee
Copy link
Collaborator

Hi @jubayerhossain625,
do you mean how to save the cropped bytes as a file?
Currently the plugin doesn't support cropping as a file directly. To save the cropped bytes you can use writeBytes from File.

final tmpDir = await getTemporaryDirectory();
final file = File('${tmpDir.path}/my_image.jpg');
await file.writeAsBytes(croppedBytes);

I will add the feature to save the cropped bytes as a file directly in the future, but in the meantime you can use this workaround.

@quoc-huynh-cosee quoc-huynh-cosee changed the title crop image how to do save please share proper way How to save the cropped bytes as a file? Mar 2, 2024
@quoc-huynh-cosee quoc-huynh-cosee added the enhancement New feature or request label Mar 2, 2024
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

2 participants