BLOB image from Database breaks

Hi,

I have stored the image from ftp as LONGBLOB in MySQL database. The Image breaks on retrieving from database to render it on Label component or in Paintable Canvas. In parallel i have written the same image data to memory tag of string type and on retrieving it to Label component. I can see proper expected image. I have tried creating query tag to bring the blob data and then using tag to render the image, even though it got broken as the data was quried from database. How to resolve this behavior when fetching the image as blob from database.

Broken Image:
image

Expected Image:
image

Just based on the two images, any chance its a scaling issue? I’m not sure how your doing it different from the memory tag but I do know from experience going from querying an image to putting it in a label, you may have to have something in your script to scale the image to your label or it may not come out right. When I did it, the picture was larger than the label so I only saw part of it if I remember correctly. When I look at your broken image, I kind of wonder if its a zoomed in view. You could always try a picture of something with more detail to see.

Are you by chance storing it as a base64 string in that blob? That is how I did it recently and I had to make sure I had the right number of ‘=’ at the end of my string to render it.

To Add more details here, I have tried changing the mysql column type to longtext ( thought as string memory tag method worked), But even then it didn’t worked with longtext.