Starting with something simple, just SaveToFile() first. How do you build a 64bit image in the first place? I don't know how to make it 64-bit. Does it draw properly on your form, using standard Canvas.Draw command? Add that to roughly this kind code:
var pic: TPicture;
begin
// --- Build the image ---
pic:=TPicture.Create;
//pic.Bitmap.PixelFormat:=pfCustom; // ???
pic.Bitmap.SetSize(256, 256);
pic.Bitmap.Canvas.TextOut(10, 10, 'Test');
// --- Save it ---
pic.SaveToFile('c:\test.jpg');
pic.Free;
If that works, you can then look into how to encrypt the stream. SaveToFile is using FileStream internally, so it's good enough for testing.