Hi, I solved this problem. I will break it down as follow.
- get_analyze_result_figure method from document_intelligence_client return a response as bytecode for each figure it extracted. Figures bytecode will be split into different parts. The respone is something like this
b'\x89PNG\r\n\x1a\n b'\xf4\x18R\x87\xf3B b'\x0f\xa4\x02\x - Then I use a python bytes object to get byte paths from response
I tested, this work.from PIL import Image from io import BytesIO response = document_intelligence_client.get_analyze_result_figure( model_id=result.model_id, result_id=operation_id, figure_id=figure['id'] # or figure.name ) response_bytes = bytes() for ith in response: response_bytes += ith image = Image.open(io.BytesIO(response_bytes)) # Now response became an complete image wi bytecode form, we can parse it to anywhere from azure.storage.blob import BlobServiceClient blob_service_client = BlobServiceClient.from_connection_string("your_connection_string") blob_client = blob_service_client.get_blob_client(container="your_container", blob=f"{fig_name}.jpg") blob_client.upload_blob( - About SDK, examples are excellent, but I think it will be better if you write more about what does funtions return.
Thank for all your support and guidance.