Coverting image alone to base64 code

Hi,

I am just wondering, is there a way to convert the image file alone to base64 code using the aspose API.

Many Thanks
Ragu

can someone help me on this?

Hi
Thanks for your request. Do you mean storing images as base 64 in HTML produced by Aspose.Words? if so you can achieve this by setting the option in HtmlSaveOptions:
https://reference.aspose.com/words/java/com.aspose.words/htmlsaveoptions/#getExportFontsAsBase64
Hope this helps.
Best regards,

Thanks. I am aware of this, but in my case I am uploading an image itself and expecting the base 64 code for that image from aspose API.

Please let me know your comments.

Hi
Thank you for additional information. Aspose.Words does not work with stand alone images. Of course, you can insert your image into a Document and save the document to HTML and then extract base64 representation of the image from this HTML. However, I suppose you can use the approach like suggested will be better:
http://exampledepot.com/egs/java.net/Base64.html
Best regards,

Thanks, it worked for me anyways.