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

请教一下怎么加Text 文字水印? #26

Open
anye0803 opened this issue Aug 16, 2022 · 1 comment
Open

请教一下怎么加Text 文字水印? #26

anye0803 opened this issue Aug 16, 2022 · 1 comment

Comments

@anye0803
Copy link

private void drawVideoFrame(ICanvasGL canvasGL, @Nullable SurfaceTexture outsideSurfaceTexture, @Nullable BasicTexture outsideTexture) {
     // Here you can do video process
     // 此处可以视频处理,例如加水印等等
     if(textureFilterLT == null) {
         textureFilterLT = new BasicTextureFilter();
     }
     if(textureFilterRT == null) {
         textureFilterRT = new HueFilter(180);
     }
}

这里说了可以加水印,但是还是不会加text的文本水印,求教

@ChillingVan
Copy link
Owner

ChillingVan commented Aug 20, 2022

可以直接调用CanvasGL.drawBitmap()方法。如果要文字的话可以看可以看这个项目的例子:https://github.com/ChillingVan/android-openGL-canvas:参考DrawTextTextureView绘制文字的方法,本质是把文字变成Bitmap。

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