That is an interesting challenge....
Now - I have never done something similar from a subform - but technically you should be able to do this. Now that does not mean that ISIM Java API supports it - and trying to debug a custom subform in a forum like this is almost dead up front.
I suggest that you raise a support case and asks if the API actually can handle binary attributes - I would be very surprised if not as many things in ISIM (e.g. ACIs and workflows) are handled as binary attributes - BUT - that does not mean the Attribute/AttributeValue methods are able to the job...
I know this is not much help and I hope somebody else may have done this (I would be surprised if not - adding images to ISIM as a standard attribute has been a common wish since I started with ISIM almost 20 years ago...) will chime in...
Anyhow - I hope this helps..
------------------------------
Franz Wolfhagen
IAM Technical Architect for Europe - Certified Consulting IT Specialist
IBM Security Expert Labs
------------------------------