When rendering text on an image, enter PHP code that will return your dynamic text. Do not use <?php ?> tags.
EG
`return format_date(time());`
`return $file_data->description ? $file_data->description : $node->teaser;`

Note that executing incorrect PHP-code can break your Drupal site.

#### Available data objects

Many different types of data derived from the image may be available as php values:

`$node`
  A handle on the owning node object, if any.
  `return $node->title;`
  `return format_date($node->created);`
`$image`
  A handle on the internal imageeapi technical image object.
  `return $image->source;`
  `return basename($image->source);`
  `return $image->info["filesize"];`
`$file_metadata`
  A collection of metadata that may have been deduced from other sources or context. Values inside `$file_data` is namespaced, structured and attributed, so can be complex to read.
  `drupal_set_message('<pre>'. print_r($file_metadata,1). '</pre>'); return "";`
`$file_data`
  A simplified list of metadata values that may have been deduced from other sources. This is a flattened, simplified version of `$file_data` with no namespaces and all-lowercase attribute names. `$file_metadata->Iptc4xmpCore:Scene['pjmt:0'] = "exterior view";` becomes `$file_data->scene = "exterior view"`
  `return $file_attributes->description`
  `return $file_attributes->copyright`

#### Where the data comes from

If it's an image.module image then a `$node` object with its values may be available.

If it's an image that has been attached to a node using CCK filefield imagefield (or just filefield) then as well as the parent `$node` object, the `$file_data` object that may contain a file description (or other meta supplied by cck) from that file field.
`return $file_data->description;`
So far that seems to be the only available 'data' provided by filefield, but you can investigate the node structure using devel.module or print_r() to see what else this array actually contains.

If it's a file that's just been attached using upload.module, a `$file_data` object may also have a description.
`return $file_data->description;`

If the image path is detected as belonging to more than one node, just the data for the first one found is returned.

If you have meta_inspector available, then many more (namespaced) metadata fields may be available on the `$file_metadata` and `$file_data` object. Note that they will often be structured arrays.
`$attname = "dc:creator"; return @reset($file_metadata->$attname);`
See the documentation for the meta suite and `HOOK_metadata_from_file()` for more about this data structure..