Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
I'm using ImageMagick ver 6.9.3-7 to write text over pictures. I've noticed that the same text with the same font looks much better in html canvas and I'm trying to make it looks the same.
gmFrame
.font("./assets/impact.ttf", fontSize)
.stroke("#000")
.strokeWidth(8)
.draw(`gravity center text ${position.x},${position.y} '${text}'`)
.stroke("transparent")
.fill("#fff")
.draw(`gravity center text ${position.x},${position.y} '${text}'`);
You haven't shown your complete code (where did the background image come from?). Something has enlarged the second image, after creating the text, creating the blockiness.
I don't see what is wrong with the IM version. It creates a raster (pixel) image. If you zoom in to a raster image, the pixels will be enlarged, by duplication or some other method.
If you leave text as text, in vector format, then it isn't rasterised until after any zooming, so it will look better.
If you want to blur just the text and not the background, you need to draw the text to a blank image, blur it, then composite that over the background.
I run into a problem, maybe you can help. Since I use node js I use the gm module (which also handles IM) to talk with IM. The way gm module execute the convert command is with child_process.spawn and by sending the convert command and the arguments to a shell.