The principle is the same, just cut the Base64 stuff out of code from GetMem's code and insert what "Pas2JS" deliver as Base64 decoded, put that into a stream, assign stream to image and you have what you wanted.
But maybe I do misunderstand your request.
No worry about your english, mine aint better