What is the format of the input file? What format do you want the output video file to be? Do you want it be the same resolution as the photograph, or cropped/extended to a particular aspect ratio/resolution? What should the duration of the output video file be?
For command-line image/video-editing tools, look into ffmpeg.
Is there a sort of copy command or something like that for Unix?
The extension of the filename doesn't matter as far as the content of the file is concerned. If the content of the file is an image format (JPEG, or PNG, etc.), then it's an image, full stop.
If you want your file explorer or what have you to correctly do things like preview or open the file in your default photo viewer, then your original idea of copying to a new name or renaming the file is what you want.
This is how I interpret your monumentally clear request:
A. THE PROBLEM
1. There is a file of yours called xyz.txt
2. If the file is simply renamed xyz.bmp it represents a normal picture file as a normal .bmp file. (The .txt suffix is accidental (or whatever))
3. Using the Terminal app (only) on a Mac you want to display the picture.
B. ONE POSSIBLE SOLUTION
1. Open Terminal
2. cd to the folder containing the xyz.txt file
(Use the ls command to verify that the location is correct)
3. mv xyz.txt xyz.bmp i.e rename file
4. open -a preview xyz.bmp xyz picture will then be displayed in Preview