That's a custom function that will do it via Base64Encode/Decode.
The other option would be to export the field contents using a different name, then import that exported file to the same container.
I presume by "set the name of the image" - you mean to say the filename of the image inserted?
What you may need to do is to import the image as you normally would, then trigger a script on the container field that exports the field contents... at this point, you can give the export a filename (using variables in the script) then re-insert the image. The only thing you may want to consider is the file type and file extension when exporting the file out. If you are only dealing with one file type, it's a piece of cake.
file swapping is a bit of a pain on iOS, which is why I suggested the custom function that can rename the file. Should work fine for camera images on the iPad. Maybe not so much with videos.
What I am trying to do is define the name that the image will have when it is exported, via script, to the Launch Center on the iPad. I would like the file name to be a concatonation of some of the other fields.
I also want to record the text name of the image in a text field in the same record as the image container.
You can define a variable name as part of an export field contents script step. Or you can rename the container field using the two techniques we mentioned already.
For a simple rename on export script:
Set Variable [ $file ; "file:" & get(documentspath) & "yourFileName" & ".jpg" ]
Export Field Contents