Copy link to clipboard
Copied
It's not obvious as to how to set a background color which is by default, black.
Copy link to clipboard
Copied
Err... no it ain't. There's no "default" because text written with imageDrawText() doesn't have any background colour. It just writes the text over the top of whatever is there.
Can you provide a repro case that demonstrates what you're seeing. Also attach "before" and "after" examples of images having been processed by your repro case.
Also: what version of CF are you on, what JVM version, and what OS.
--
Adam
Copy link to clipboard
Copied
This actually is possible. Here is a link to a blog post I did a while back about creating a pure text image. You can then, in theory, place the result of that image onto a colored box.
http://blog.dkferguson.com/index.cfm/2009/8/25/Creating-text-image-with-ColdFusion-8
--Dave
Copy link to clipboard
Copied
CFGadget wrote:
It's not obvious as to how to set a background color which is by default, black.
Assuming you mean set the background color of a new image, just set the desired canvas color using hex or a named color ie "red", "white", ...
ImageNew([source, width, height, imageType, canvasColor])