Convert image to 8bitmime

Hi, I'm trying to write a rest sdk client for Facebook integration. But I stuck at upload user photos.

https://developers.facebook.com/docs/graph-api/reference/v2.2/user/photos

Based document, the photo, encoded as form data (multipart/form-data). I did encode my png image to base64 and put in boundary block. But I always got response "Can't read image" from server.

I'm really want to know how to convert image to 8bit data MIME for uploading.

Please give me some advice about image encoding for upload. Thanks in advance.
Topic archived. No new replies allowed.