AndroidInstantVideo icon indicating copy to clipboard operation
AndroidInstantVideo copied to clipboard

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

Open anye0803 opened this issue 2 years ago • 1 comments

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的文本水印,求教

anye0803 avatar Aug 16 '22 06:08 anye0803

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

ChillingVan avatar Aug 20 '22 09:08 ChillingVan