Loading Image from DataSnap Server to Android App |
|
Im loading a imagen into a Timage on my Android App,
I have:
XE5
DataSnap Server
App Android Client
if the image is like (40KB, 200x200) the image show perfectly in the Timage
but if the image is like (320KB, 970x800) the image show nothing in the Timage, and dont guive any error just dont show the image.
I use this routine to load the image from my DataSnap Server
var
BlobStream: TStream;
begin
TClienDataSet1.Open;
BlobStream := TClienDataSet1.CreateBlobStream(TClienDataSet1.FieldByName('image'),TBlobStreamMode.bmRead);
try
TImage1.Bitmap.LoadFromStream(BlobStream );
finally
BlobStream.Free;
end;
end;
|
Re: Loading Image from DataSnap Server to Android App |
|
i only know these [url=http://www.rasteredge.com/how-to/csharp-imaging/download-from-url/]image loading codes[/url], hope it is help to you. it can [url=http://www.rasteredge.com/how-to/csharp-imaging/load-from-file/]load image from file[/url], url and .net graphics.
private void button1_Click(object sender, EventArgs e)
{
string fileName = "c:/Sample.png";
REImage reImage = REFile.OpenImageFile(fileName);
REFile.SaveImageFile(reImage, "c:/reimage.png", new PNGEncoder());
|
Re: Loading Image from DataSnap Server to Android App |
|