Hi:
Make a backup of your form. Then save it as source files. Make a list of the picture files you aren't using any longer, and search for them in manifest.xsf, after opening the file with a text editor, like Notepad.
You may find file references like:
<xsf:file name="5F9B8887.png">
<xsf:fileProperties>
<xsf:property name="fileType" type="string" value="viewComponent"></xsf:property>
</xsf:fileProperties>
</xsf:file>
Try deleting the file references from the manifest, save changes, then delete the files from your source files. Right click on manifest.xsf and select Design to re-open in design mode, and you can use Save As to pack your files back up into a template.
So you know -- I haven't actually tried this. Be sure to save a copy of your form file first!