It would be difficult if you didn't know the width of the image beforehand... If this is for an article or something it might be a good idea to set a specific width in pixels anyway...
I'd do something like
Code:
<table border="0" align="center" width="300">
<tr><td><img src="{option}" width="300" border="0" /></td></tr>
<tr><td><div align="center">{param}</div></td></tr></table>
Change the 2 instances of "300" to the width you wan to set.
In BB Code Manager make sure you have "Use Option" set to YES...
Give it a name, description, etc...
You would than use it like
Code:
[imgc="http://pathtoimage/file.jpg"]Text you want to center.[/imgc]
Assuming you made the tag name "imgc" (for image centered).