Please try to save the memory stream to a file (just after SaveToStreamAll):
ms.SaveTofile('output.all');
Now look at the output.all (check its file size or try to load it using TImageEnVect.LoadFromFileAll()). This just to check the problem comes actually from ImageEn.