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

Need method for saving image in random directory #31

Closed
dsokolov opened this issue May 3, 2013 · 2 comments
Closed

Need method for saving image in random directory #31

dsokolov opened this issue May 3, 2013 · 2 comments

Comments

@dsokolov
Copy link

dsokolov commented May 3, 2013

Somthing like this in GPUImageView class:

public void saveToPictures(final File file, final GPUImage.OnPictureSavedListener listener) {
..
}

where file - any file in device file system.

pboos pushed a commit that referenced this issue May 7, 2013
…. Resize view for capturing picture of bigger size.

Closes #19
References #31
@pboos
Copy link
Collaborator

pboos commented May 7, 2013

I do not want to add too many different functions. But I added one function that you can use to do what you want:

GPUImageView.capture() will return a Bitmap. Here some code how to achieve your goal (written here, not tested).

File file = new File("/path/to/your/file");
Bitmap bitmap = mGPUImageView.capture();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, new FileOutputStream(file));

I hope this does what you want. If not, please reopen this issue :).

@pboos pboos closed this as completed May 7, 2013
@dsokolov
Copy link
Author

dsokolov commented May 7, 2013

This is what I want. Thanks!

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