Questions tagged [drawtext]

340 questions
5
votes
1 answer

qt draw colorful text

I use QPainter to drawText on QPrinter; however, there is a problem. I hope I can draw a colorful text. For example, drawing "Hello World" where the "H" is green, "ello" is yellow, "World" is blue. For the time being, I call drawText 3 times and…
Arton
  • 443
  • 1
  • 6
  • 15
5
votes
2 answers

How to add text to a video with ffmpeg and python

I've been trying to add text to an avi with ffmpeg and I can't seem to get it right. Please help: import subprocess ffmpeg = "C:\\ffmpeg_10_6_11.exe" inVid = "C:\\test_in.avi" outVid = "C:\\test_out.avi" proc = subprocess.Popen(ffmpeg + " -i " +…
Jay
  • 3,373
  • 6
  • 38
  • 55
5
votes
0 answers

TextRenderer.DrawText using GDI to render OTF Fonts?

I'm trying to draw text over a bitmap image and I've done some research and found that .NET/GDI+ doesn't support OTF fonts. I read somewhere that you could use TextRenderer.DrawText to render OTF fonts with GDI, but I can't seem to figure out how,…
Evan Layman
  • 3,691
  • 9
  • 31
  • 48
5
votes
0 answers

ffmpeg drawtext how to set direction right to left

i write arabic text to videos and it works fine but the issue is that the arabic language is written from right to left so the text must align right not left i get the text like this and it should be like this my code ffmpeg -y -i input.mp4…
5
votes
3 answers

How to escape all special characters for ffmpeg drawtext filter in java

Does anyone have a good recipe for escaping all of the special characters (',%,\,:,{,}) from a String in java, that will be used in an ffmpeg drawtext filter chain? Trying to use replaceAll with different combinations of escaping has been an…
ezwrighter
  • 997
  • 8
  • 18
5
votes
1 answer

Drawing unicode text on listbox canvas is too slow

I am trying to display news from a RSS in a listbox using the following format as shown in the image below. The application on the screenshot has been developed in firemonkey by styling the listbox. I need to display the same in my VCL…
Rabi Jayasawal
  • 441
  • 1
  • 9
  • 18
5
votes
1 answer

How to drawTextBlock in zend PDF

I using ZendFW 1.7.2 in my project and need to save PDF file. i am success for use function drawText but some of my data is too long so i need it break line. Now i get a solution from…
koe
  • 736
  • 1
  • 12
  • 33
5
votes
2 answers

How to draw large sized text on a canvas?

I want to draw on canvas month's text vertical along screen height. Paint init: this.paint = new Paint(); this.paint.setAntiAlias(true); this.paint.setDither(true); this.paint.setSubpixelText(true); …
Sash0k
  • 750
  • 2
  • 10
  • 24
4
votes
0 answers

How to convert Unicode text into a Bitmap

I need to convert a text containing Unicode chars into a Bitmap that could have a transparent background as well. I found and tried different posts like this, this, or this, but no one seems to work for me. I found also this post that suggests using…
ilCosmico
  • 1,319
  • 15
  • 26
4
votes
0 answers

ffmpeg drawbox heigth from drawtext

I want to create a background for my text in my video, I use this command: ffmpeg -i in.mp4 -filter_complex "[0:v]drawtext=font='arial.ttf': text='This is text line 1':x=(w-tw)/2:y=((h-text_h)/2)-(text_h): fontsize=55:…
4
votes
0 answers

How to use ImageMagick `drawtext` method in AWS Lambda function?

I currently am running a Node 8 Lambda function using ImageMagick 7 surfaced by the Node gm module (https://github.com/aheckmann/gm) to annotate some image processing. The other ImageMagick functions (such as resize() or quality()) that I am using…
tesslins
  • 331
  • 1
  • 3
  • 5
4
votes
1 answer

FFmpeg drawtext filter - is it possible to use variables with live data for x,y coordinates?

I'd like to use variables for FFmpeg's drawtext filter's x,y coordinates so I can feed them with real-time data. The below solution with sendcmd works but I have to add relative timecodes at the beginnings so FFmpeg can link coordinates to time…
DavidK
  • 111
  • 7
4
votes
0 answers

Text alignment in qt with drawText() leads to error with fnt-font

I use fnt-font in my qt-application. On every call to drawText() with any alignment I get the following error : Failed to compute left/right minimum bearings for "" - It works if I : don't use alignment use any ttf-font GCC - C++ - code : //…
MLCS
  • 41
  • 2
4
votes
2 answers

Delphi: How to draw some text in requested width and number of lines, with ending ellipsis?

I need to draw some text in a table cell with fixed width (in pixels) and fixed number of text lines. If the text is clipped by cell rectangle, it must end with ellipsis. The problem is I can't calculate the text rectangle correctly (or the…
Andrew
  • 3,696
  • 3
  • 40
  • 71
4
votes
2 answers

FFMPEG add text frames to the start of video

I have some videos either in mp4 or webm format, and I'd like to use ffmpeg to add 4 seconds to the start of each video to display some text in the center with no sound. Some other requirements: try to avoid re-encoding the video need to maintain…
Ryan
  • 43
  • 1
  • 6
1 2
3
22 23