Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

How can I use this to manipulate Image? #7

Open
vxhviet opened this issue Apr 12, 2017 · 5 comments
Open

How can I use this to manipulate Image? #7

vxhviet opened this issue Apr 12, 2017 · 5 comments
Assignees
Labels
Milestone

Comments

@vxhviet
Copy link

vxhviet commented Apr 12, 2017

Hi,
I would like to ask how can I use this lib to manipulate image (brightness, contrast, etc..) as in the original android-gpuimage project. For example, I used to do this:

        mGPUImage = new GPUImage(mContext);
        mGPUImage.setGLSurfaceView(mSurface);
        mGPUImage.setScaleType(GPUImage.ScaleType.CENTER_INSIDE);
        mGPUImage.setImage(mUri);
       
        final GPUImageContrastFilter contrastFilter = new GPUImageContrastFilter(1.0f);
        mGPUImage.setFilter(contrastFilter);

        .....
      
        contrastFilter.setContrast(contrastValue);
        mGPUImage.requestRender();

However, after digging around the lib, I can't find GPUImage anywhere.

Another question, I'm looking for another lib mostly because of this unresolved bug. I would like to ask is this fixed with this current release?

Thank you so much for your time.

@Windsander
Copy link
Owner

oops, i haven't notice it. ;p
thx for you bug report. sure there is a bug here. I think I just reconstruct the original project but seem forgot to forge the pure image operate.
This problem will fix in next release. So, if u want to use this lib to render a single image, i suggest u use original project, or wait my next release.
For now, this project can only handle condition with using camera state.
;p ;p

@Windsander
Copy link
Owner

Now I'm handle this problem.

@Windsander Windsander self-assigned this Apr 22, 2017
@Windsander Windsander added this to the v1.0.1 dev milestone Apr 22, 2017
@Windsander
Copy link
Owner

done, now u can use this like:

@Override
public void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity);

    // prepare surface.
    mRecorderViews = (FilterRecoderView) findViewById(R.id.vp_video_recorder_gl);
    
    // prepare the filter you want to use
    final GPUImageContrastFilter contrastFilter = new GPUImageContrastFilter(1.0f);
    contrastFilter.setContrast(contrastValue);
    
    // bind to PureImageManager and render
    PureImageManager.init(context)
                    .setGLSurfaceView(mRecorderViews)
                    .setScaleType(GPUImage.ScaleType.CENTER_INSIDE)
                    .setImage(mUri)
                    .setFilter(contrastFilter)
                    .requestRender();
}

@AuxanoWeb
Copy link

Hi @Windsander appreciate your above code help
I used your code but shows the BLACK SCREEN.
Can you please help me to solve this problem? or Can you give any demo project link for the same?
Waiting for your reply.

@Windsander
Copy link
Owner

Ohly, this is a problem.
when I finish my work in hand, I will try to solve it.
Thx for report. :)

@Windsander Windsander modified the milestones: 1.0.3, v1.0.1 dev Sep 6, 2017
@Windsander Windsander added bug and removed enhancement labels Sep 6, 2017
@Windsander Windsander reopened this Sep 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants