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

unable to get the bitmap of a requested render / resultBitmap #448

Closed
moelle89 opened this issue Dec 7, 2019 · 5 comments
Closed

unable to get the bitmap of a requested render / resultBitmap #448

moelle89 opened this issue Dec 7, 2019 · 5 comments

Comments

@moelle89
Copy link

moelle89 commented Dec 7, 2019

hey,
I am actually a Graphic Designer with just limited java development skills, so please forgive me if my question might sound weird or dumb. I really tried to figure it out by myself so far, yet wasnt able to find a proper way to do it.

So, I got setup an ImageGLSurfaceView with a bitmap and filterConfig by using a setSurfaceCreatedCallback. Everything works fine, but at a certain point I need to get the actual resultBitmap (or requested render ) provided as a Bitmap, to be able to modify it outside of the SurfaceView and finally get it back into the render-process to keep on using it on my surfaceView.

I would love to know about the proper way to get the resultBitmap or at least the latest render provided as "cached" Bitmap to use it on a different class. - If i save it as a local file, it works fine. I just want to avoid that.

createImageFromBitmap(bmp) works fine using that Callback:

    mImageView.getResultBitmap(new ImageGLSurfaceView.QueryResultBitmapCallback() {
        @Override
        public void get(Bitmap bmp) {
            **createImageFromBitmap(bmp);**
        }});

But if i am trying to do use the Bitmap bmp like a common bitmap to be used by another class, it doesnt work at all.

    mImageView.getResultBitmap(new ImageGLSurfaceView.QueryResultBitmapCallback() {
        @Override
        public void get(Bitmap bmp) {
            **externClass.setImage(bmp);**
        }});
  • even if am trying to pull it directly from the handler it doesnt really seem to work;

        handler = mImageView.getImageHandler();
        handler.processFilters();
        **externClass.setImage(handler.getResultBitmap(););**
    

So whats the deal? What do i completely miss? I used similar GPUimage libs before, fortunately the all pulled the requestedRender or ResultImage without any required Callbacks or queueEvent, "unfortunately" they cant compete with this awesome library!

@wysaid
Copy link
Owner

wysaid commented Dec 8, 2019

Please produce the problem with the demo. And I will take a look for that.

@moelle89
Copy link
Author

moelle89 commented Dec 9, 2019

Please produce the problem with the demo. And I will take a look for that.

Thank you! I just managed to find the issue by trying to reproduce the issue with the demo. I was using the QueryResultBitmapCallback in a wrong way. - Sorry, for that.

@moelle89 moelle89 closed this as completed Dec 9, 2019
@moelle89 moelle89 reopened this Dec 10, 2019
@moelle89
Copy link
Author

Okay there is still something I couldnt figure out;

as I mentioned, at a certain point, I take the resultBitmap, modify it within another class and then I' m adding it back into the surfaceView.

Then I need to have all basic filters + seekbars reset. How can I reset the whole cobfig? Tge demo only shows how to reset the last filter.

@wysaid
Copy link
Owner

wysaid commented Dec 10, 2019

Okay there is still something I couldnt figure out;

as I mentioned, at a certain point, I take the resultBitmap, modify it within another class and then I' m adding it back into the surfaceView.

Then I need to have all basic filters + seekbars reset. How can I reset the whole cobfig? Tge demo only shows how to reset the last filter.

It's just a demo. Maybe you can do those things on your own way.

@moelle89
Copy link
Author

Okay there is still something I couldnt figure out;
as I mentioned, at a certain point, I take the resultBitmap, modify it within another class and then I' m adding it back into the surfaceView.
Then I need to have all basic filters + seekbars reset. How can I reset the whole cobfig? Tge demo only shows how to reset the last filter.

It's just a demo. Maybe you can do those things on your own way.

Gotcha, I'm sorry if I was bothering. Thanks for taking time to respond, though.

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