0

At the moment I use Sony’s Imaging Edge Desktop to make individual photos viewable in camera. However, this is cumbersome if there are many pictures.

How can it be done from the command line?

According to the thread Make JPEG file DCF compatible in the ExifTool Forum it’s possible with ExifTool, but so far I haven’t succeeded. I tried copying EXIF data from an image taken with my camera (Ricoh GR III):

exiftool -TagsFromFile R0000001.JPG -all:all -unsafe -XML:All R0000007.JPG
  • ...but so far I haven’t succeeded. Glad to see that you've tried already. Could you please share what commands/scripts/methods you used so far and what their (non-successful) outcome was? Also, what's the final goal of uploading photos to your camera? – Saaru Lindestøkke Jul 29 at 12:46
  • I basically tried copying all EXIF data from an image that I took with the camera. The goal is to view pictures on the camera that come from elsewhere. It works, just with that Sony tool, I think there is no batch option. – feklee Jul 29 at 13:15
  • How did you try copying all EXIF data? Feel free to rewrite your question and include the command that you used for that. I understand that you want to view the pictures on camera, but is that really the end-goal? I suspect you want to view them on camera for a certain purpose. If you can include that purpose in your question, there might be other methods to achieve the same end-goal. – Saaru Lindestøkke Jul 29 at 13:37
  • The end-goal is to view pictures in the camera. – feklee Jul 29 at 13:46
  • 1
    Did you delete any JFIF blocks as per that thread? You would add -JFIF:ALL= to your command. – StarGeek Jul 29 at 14:52
3

Finally, with lots of help on the Internet, including the suggestion by @StarGeek, I got it to work. The required tools are:

You also need a photo taken with the camera, here:

R0000349.JPG

For testing, if you don't have an existing image, create one (can be any aspect ratio):

convert -size 2000x1000 radial-gradient:red-blue TEST.JPG

Then convert that image:

INPUT=TEST.JPG
OUTPUT=A0000001.JPG # DCF compatible
THUMBNAIL=THUMB.JPG
ORIGINAL=R0000349.JPG # taken with the camera
convert -sampling-factor 4:2:2 $INPUT $OUTPUT
exiftool -TagsFromFile $ORIGINAL -all:all -unsafe -XML:All -JFIF:ALL= $OUTPUT
convert $INPUT -resize 160x120 -background black -gravity center -extent 160x120 -sampling-factor 4:2:2 $THUMBNAIL
exiftool "-ThumbnailImage<=$THUMBNAIL" $OUTPUT

To set the orientation of the image, add another step:

ORIENTATION=1 # 1 = 0°, 3 = 180°, 6 = 90°, 8 = -90°
exiftool -Orientation=$ORIENTATION -n $OUTPUT

Finally, put $OUTPUT into a DCF compatible path on your camera.

Make sure that the number in the file name is unique on the card, or else the camera may be confused. For example, if there is A0000001.JPG and B0000001.JPG on the card, then my Ricoh GR III displays neither of the images.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.