I have declared a variable as
Bitmap image;
Container storeImg;
I am storing the image as
storeImg+= image;
the image is stored as BLOB type in container
Later On when I try to retrieve the image in a Bitmap variable e.g.
Bitmap image2;
image2 = conpeek(storeImg,1);
I get an “operand mismatch error”
My question is I have declared the image as bitmap and stored in a container then why the error when I am trying to retrieve the same in a bitmap datatype only?
Thanks in advance.
The
Bitmapextended data type is really a container.Adding containers gives concatenation which may be (part of) your problem:
This prints 6, not 2 as you may assume.
Also
blobandcontaineris not the same thing:This will fail because
storeImgcontains twoblobvalues.Change the assignments to:
This will work, because now
storeImgcontains twocontainervalues (containing ablob).Also see Load and Save file from and to container field