Problem in loading image from server | developer.brewmp.com Problem in loading image from server | developer.brewmp.com

Developer

Problem in loading image from server

Forums:

Hi,

I am using Brew 3.1.5 SDK. I am trying to download a .bmp/.jpeg image from server. In the WebRespInfo structure i am getting the correct content type and length. When I tried using IASTREAM_Read(), the return value is not equal to the contentlength. It is not reading the full image. Also in IImage_SetStream() the Iastream value is not copied into the IImage interface. I cant figure out the problem. :confused: Hope I get a solution in brew forum.

Jothi.

Jothi,
From your information I assume that you use IWEB_GetResponse(). Did you set the call back functionn to read with ISOURCE_Read()? This call back should receive complete image.
I am not sure from where you did a IASTREAM_Read().
BRU

Jothi,
From your information I assume that you use IWEB_GetResponse(). Did you set the call back functionn to read with ISOURCE_Read()? This call back should receive complete image.
I am not sure from where you did a IASTREAM_Read().
BRU

Hi Bru,
Thanks for your reply. Yes I have set a callback which is using ISource_read() to load the image. Still its not working. Only half of the image is getting loaded. But the size of the loaded image is same as the original image. Dont get where the problem is :confused:
Jothi

Hi Bru,
Thanks for your reply. Yes I have set a callback which is using ISource_read() to load the image. Still its not working. Only half of the image is getting loaded. But the size of the loaded image is same as the original image. Dont get where the problem is :confused:
Jothi

Save the image as file and see if thats the real file or having problem in loading image.
1.If the file is corrupted, then you can check the buffer just after completing download
2.Also check the buffer is allocated with enough memory.
Thanks
BRU

Save the image as file and see if thats the real file or having problem in loading image.
1.If the file is corrupted, then you can check the buffer just after completing download
2.Also check the buffer is allocated with enough memory.
Thanks
BRU

hey friends
also note that the image might not be recieved in one go.....u might need to call isource_read plenty no. of times...also take care of would blocks

hey friends
also note that the image might not be recieved in one go.....u might need to call isource_read plenty no. of times...also take care of would blocks

Hey friends,
Thanks for all your replies. The image is getting loaded in the simulator. But since the image is large, I am able to view only a portion of the image. Is there any provision for placing scroll bars? I am just working on that. If anyone know the solution, please help me out.
Jothi.

Hey friends,
Thanks for all your replies. The image is getting loaded in the simulator. But since the image is large, I am able to view only a portion of the image. Is there any provision for placing scroll bars? I am just working on that. If anyone know the solution, please help me out.
Jothi.

There is an Image viewer named as "IImage". Please refer to it. This will allow you to scroll up/down on arrow_up/arrow_down.

There is an Image viewer named as "IImage". Please refer to it. This will allow you to scroll up/down on arrow_up/arrow_down.