1

Photo Booth saves photos in JPG and I find it a bit tedious to convert from JPG to PNG. I’m not using Automator anymore for this.

For some reason when I use imagesnap, it can only save in JPG.

So what software program could I use to make my webcam pictures in PNG? There is a Python script written by machine learning researchers that can only accept PNG (see here).

imagesnap -h
Capturing image from device "<imagesnap-master 
USAGE: ./imagesnap [options] [filename]
Version: 0.2.5
Captures an image from a video device and saves it in a file.
If no device is specified, the system default will be used.
If no filename is specfied, snapshot.jpg will be used.
JPEG is the only supported output type.
  -h          This help message
  -v          Verbose mode
  -l          List available video devices
  -t x.xx     Take a picture every x.xx seconds
  -q          Quiet mode. Do not output any text
  -w x.xx     Warmup. Delay snapshot x.xx seconds after turning on camera
  -d device   Use named video device
  • Weirdly enough this seems to support more formats – Roxiun May 17 at 13:21
  • Yea, I find it weird as well. I just did brew reinstall imagesnap, yet I still only get JPEG. That's the reason why I included a screenshot. – Melvin Roest May 17 at 13:22
  • @MelvinRoest If you're willing to write a script, life2coding.com/save-opencv-images-jpeg-quality-png-compression use opencv library in python. Just give it access to the webcam & it will work. – anki May 17 at 13:23
  • If I were you I would try cloning the repo or downloading it from here – Roxiun May 17 at 13:24
  • Fair enough, I could build it myself. It seems like such a simple task that I didn't thought of that. – Melvin Roest May 17 at 13:25
6

The version of imagesnap distributed through Homebrew (and available on https://github.com/rharder/imagesnap) doesn't support PNG. Apparently support for other formats besides JPG was removed when QTKit got replaced by AVFoundation.

If you download 0.2.5 directly from http://iharder.sourceforge.net/current/macosx/imagesnap/ you get a version which also supports other formats.

$ ./imagesnap -h
USAGE: ./imagesnap [options] [filename]
Version: 0.2.5
Captures an image from a video device and saves it in a file.
If no device is specified, the system default will be used.
If no filename is specfied, snapshot.jpg will be used.
Supported image types: JPEG, TIFF, PNG, GIF, BMP
  -h          This help message
  -v          Verbose mode
  -l          List available video devices
  -t x.xx     Take a picture every x.xx seconds
  -q          Quiet mode. Do not output any text
  -w x.xx     Warmup. Delay snapshot x.xx seconds after turning on camera
  -d device   Use named video device
| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .