PHOTOPC(1)

🌸 PHOTOPC ✨

okay bestie, buckle UP, because this is photopc, manual section 1 (that's the "(1)" bestie, it's giving User Commands energy) πŸ’…


✨ NAME ✨

photopc β€” utility to control digital cameras based on Sierra Imaging firmware πŸŽ€


✨ SYNOPSIS ✨

photopc [-h] [-V] [-v[v]] [-q] [-z] [-t] [-f timeformat] [-s <speed>]
[-S <pseudo-speed>] [-l <device>] [command [params] ] ...

✨ DESCRIPTION ✨

So basically πŸ’– this is a command line tool to manipulate digital still cameras that use certain control protocol, namely Agfa ePhoto line, Epson PhotoPC line, Olympus D-xxxL line, Sanyo and Nikon (at least CoolPix 9xx) cameras. It can set camera parameters, download and erase pictures, e.t.c. πŸ‘‘

It was originally developed for Epson PhotoPC 500, now the author uses it with Olympus D-600L, results with other models may vary πŸ™ˆ


✨ OPTIONS ✨

  • -h β€” This option produces a help screen of all options and commands. your lil cheat sheet fr fr 🫢
  • -V β€” This option prints software revision information. the receipts, the lore πŸ“œ
  • -v β€” This option enables verbose output. Using two -v options increases the level of verbosity. This is primarily meant for debugging. not me turning the volume all the way up to see what's happening πŸ’€
  • -q β€” This option sets quiet mode. If it is not specified, the program will show running download progress indicator. so like, no yapping, just vibes 🀫
  • -z β€” This option sets no time-zone processing mode. Use this option if the camera's clock is (should be) set up shifted by the local timezone offset. time is fake anyway ⏰✨
  • -s speed β€” This option permits setting the data rate to use when communicating with the camera. Valid rates are 9600, 19200, 38400, 57600 and 115200 (the default). pick your pace bestie πŸƒβ™€οΈ
  • -S speed β€” On some UNIX systems with some serial hardware/driver combinations you need to "lie" to the driver about the communication speed that you want to use at startup and during the session. Physical startup speed is always 19200. E.g., if on your system speeds up to 19200 are translated one to one, but in order to use 57600 baud you have to specify 50 baud, and you want to run at 57600, you'll need to specify photopc -s57600 -S19200,50 <commands ...>

Another example: if your driver will use physical speed four times as high as you told it to set, and you want to run at default 115200 physical speed, specify photopc -S4800,28800 <commands ...>

okay so this one is literally gaslighting your serial driver and honestly? iconic 😭
  • -t β€” Set timestamp of generated files to the time of snapshot. it's giving "when was this taken" main character energy πŸ“Έ
  • -f timeformat β€” This option permits specifying the format for automatically generated image file names; the value is used as the format string for strftime(3) function. By default, names of the format "MMDD_NNN.jpg" are generated, where MM is a month, DD is a day, and NNN is a count starting from 001. A good starting point for the timeformat value could be "%Y_%m_%d-%H_%M_%S.jpg". If the format string contains context "%%XXXd" where XXX are digits, it is taken for the count, i.e. if the file with such name is present, next count is tried. If the format string does not contain "%%XXXd" part, the count field, if necessary, is appended at the end of the name.

A few single-character formats are used as shortcuts. "x" makes the name of seconds since the epoch in hexadecimal format (8 characters + ".jpg"), "d" - the same in decimal format (10 characters), "1" stands for default format "%m%d_%%03d.jpg", "2" stands for "%y%m%d%%02d.jpg", "3" stands for "%Y_%m_%d-%H_%M_%S.jpg" and 4 stands for "%Y/%m/%d/%H_%M_%S.jpg". The program attempts to create intermediate directories if necessary (and possible). naming your files like a whole aesthetic πŸ’–

  • -l device β€” This allows specifying the serial device to use for communicating with the camera. The default is /dev/photopc (which is typically created as a (symbolic) link to the real device, e.g. /dev/ttyS0) in UNIX, and COM1: in DOS and Windows. Note that the program does not use UUCP style locks so you need to be certain that no other program, such as uugetty, uucico or mouse manager, is trying to access the same device. Another note: on some systems (notably Linux) terminal settings are kept across usage of the serial port by different programs. photopc may have troubles if, say, hardware flow control was kept turned on. Try "stty -F /dev/ttyXX sane" if you suspect that you are bitten by this.
⚠️ fr fr be careful here β€” no UUCP style locks means it is on you to make sure nothing else is touching that device. sharing is NOT always caring bestie πŸ’€

πŸ’– COMMANDS πŸ’–

okay bestie so after all the options, you can drop one or more commands on the command line. that's the whole vibe. ✨

Some commands take a frame-list as a parameter. And a frame-list is a comma-separated list of tokens β€” no whitespace allowed, we are NOT playing β€” and each token is one of these:

  • the word all
  • a single number
  • two numbers separated by a dash (-)
  • a number followed by a dash and the word last (again: no whitespace)

🌸 The commands themselves 🌸

  • query β€” shows you every current camera setting. the full rundown. the whole personality. πŸ’…
  • count β€” spits out how many pictures are stored in the camera. made for shell scripts, so it's giving "quiet and useful". ✨
  • list β€” info about the frames stored in the camera. the fields it shows: frame number, size of image file, protection state, resolution mode, timestamp, and filename if available. it's faster than llist but might not work on some (older) models. 😭
WARNING: this command changes current directory on models that support a directory tree on the flash media. no cap.
  • llist β€” lists more info about the frames stored in the camera. fields shown: frame number, protection state, size of image file, resolution mode, flash, shutter and timestamp. it's slower than list and it straight up does not work with models that use the Exif file format. πŸ’€
WARNING: this command changes current directory on models that support a directory tree on the flash media. again. same energy.
  • cd <path> β€” on models that support multiple directories on the flash media, it changes the current directory like you asked. πŸ¦‹

The program chdir's to the first non-empty folder at the beginning. So your first cd command must specify a full path starting with a slash. If it were unix you could also cd ../something but here we do not have a way to move up one level. that's just the situation bestie, we don't make the rules. πŸ™ˆ

  • protect <frame-list> On | Off β€” flips the "protected" status of frames. frame numbering starts at 1. The command will fail if the frame number is omitted, not numeric, or does not correspond to a stored frame. "Protected" frames cannot be erased with erase and eraseall commands or with the "erase" button on the camera. so yeah, they're in witness protection. πŸ›‘οΈ
  • erase <frame-list> β€” erases frames. frame numbering starts at 1. The command will fail if the frame number is omitted, not numeric, or does not correspond to a stored frame.

To avoid unexpected results, the list of frames specified for this command is sorted and processed in reverse order. queen behavior honestly. πŸ‘‘

  • eraseall β€” erases all stored frames. everything. gone. ✨
  • eraselast β€” erases the most recently taken frame. just that one. πŸŽ€
  • snapshot β€” takes a picture. that's it, that's the command. πŸ“Έ
  • off β€” switches off the camera. This command only has this effect on some models (notably Olympus D-600L). On other models, it just terminates the session immediately (otherwise the camera would be active several seconds after the last command). On models with big timeout, such as Photopc 600, it may be wise to always issue off at the end of a command row, to decrease power consumption.

All commands going after off are ignored. so like, say it last. periodt.

  • image <frame-list> <file-or-dir-name> β€” downloads an image or a series of images from the camera to disk file(s) on the host computer. Frame numbering starts at 1. The command will fail if the frame number is omitted, not numeric, or does not correspond to a stored frame. Files are stored in JPEG (JFIF or Exif) format. An image file also contains a thumbnail portion, and a set of parameters like the shutter speed, date and time, I.D. string and more. Directory must be specified if a frame list is requested. If a directory name is specified, downloaded file(s) will get unique names starting with month and date of the snapshot, unless the -f option is used, in which case unique names follow the -f option setting. πŸ–ΌοΈ
  • thumbnail <frame-list> <file-or-dir-name> β€” downloads a thumbnail image or a series of thumbnails from the camera to disk file(s) on the host computer. Frame numbering starts at 1. The command will fail if the frame number is omitted, not numeric, or does not correspond to a stored frame. Files are stored in JPEG (JFIF or Exif) format. If the camera does not keep files in EXIF format, then the thumbnail file also contains a set of parameters like the shutter speed, date and time, I.D. string and more. Directory must be specified if a frame list is requested. If a directory name is specified, downloaded file(s) will get unique names according to the -f option setting. 🧚
  • audio <frame-list> <file-or-dir-name> β€” downloads an audio notice file or a series of files from the camera to disk file(s) on the host computer. Frame numbering starts at 1. The command will fail if the frame number is omitted, not numeric, or does not correspond to a stored frame. Files are stored with a ".wav" extension but the format is not RIFF WAV format. It is compressed in some way, probably with some variation of ADPCM. The program stores the raw data as provided by the camera, it is not playable as a normal .wav file. Directory must be specified if a frame list is requested. If a directory name is specified, downloaded file(s) will get unique names according to the -f option setting. πŸ”Š
  • preview <file-name> β€” takes a preview snapshot and saves the image as <file-name>. The file is in JPEG (JFIF or Exif) format, and does not contain any additional data, just a plain (very low resolution) image. tiny. cute. low res. πŸ’œ
  • upload <file-name> β€” uploads an image file into the camera. This command is not enabled in the LOWMEMORY version (i.e. under MS/DOS).
WARNING! You cannot upload arbitrary JPEG files. Depending on the camera model, such an attempt may result in the image not being uploaded, not being viewable, or even the camera being "hung" and needing you to remove the batteries to make it work again. A file previously downloaded from the same camera model is always uploadable. Otherwise, your milage may vary. The photopc program does not perform any checks, so it's up to the user to provide the file in proper format. 😭 do NOT freestyle this one bestie.
  • mode Record | Play | Thumbnail β€” sets the specified operation mode on certain models. πŸŽ›οΈ
  • resolution Hi | Lo | Ext | <number> β€” sets the camera to high, low or extended resolution mode. The exact meaning of the modes is model-dependant and may specify different image dimensions and/or JPEG compression rate. 🌈
  • clock β€” sets the camera's internal real-time clock using the current date and time from the host computer. The time of taking a snapshot is included inside the JPEG files produced. Note that the models which display the time on the LCD will then display GMT rather than local time. With the -z option, time shifted by the timezone offset is set, and the LCD will display local time. Using unshifted (GMT) time in the camera seems the proper way to go. ⏰
  • shutter <speed> β€” sets the camera shutter speed. Units can be specified in microseconds or in traditional form like "1/250". The valid interval depends on the model. If a value outside the interval is specified, the camera will set the speed to the nearest margin of the valid interval. The special speed value auto will set automatic shutter. Note that this only works while the camera is connected to the host, and it automatically turns the flash off. While disconnected, the shutter speed is always set automatically. ✨
  • aperture Auto | Lo | Med | Hi β€” sets the lense aperture on models that support it. πŸŒ€
  • flash Auto | Force | Off | AntiRedeye | SlowSync β€” sets the camera flash mode. ⚑
  • id <string> β€” sets the camera identifier string that is included inside the JPEG files produced. Only a few models support this. 🏷️
  • autoshut-host <seconds> β€” automatically shuts off the camera after that many seconds of inactivity while connected to the computer (on the host). πŸ’€
  • autoshut-field <seconds> β€” automatically shuts off the camera after that many seconds of inactivity while disconnected from the computer (in the field). 🌿
  • lcd-autoshut <seconds> β€” automatically shuts off the LCD monitor after that many seconds of inactivity. πŸ–₯️
  • lcd-brightness <value> β€” sets LCD brightness to the value (valid values are 1 to 7). ✨
  • focus Macro | Normal | Infinity β€” sets the lens focusing mode. As far as I can tell, on fixed focus models macro only means force minimum aperture, not change the focal length. Only has effect in the same invocation with the snapshot command. πŸ”
  • adjust Normal | Contrast+ | Contrast- | Brightness+ | Brightness- β€” sets the adjustment of picture brightness/contrast. 🎨
  • metering Center-weighted | Spot | Matrix β€” sets the auto exposure metering mode. πŸ“Š
  • whitebalance Normal | Sunny | Incandescent | Fluorescent | Flash | Preset | Cloudy β€” sets the white balance. 🀍
  • color On | Off β€” sets color or B/W mode. 🌈
  • dzoom On | Off | <number> β€” sets digital zoom on or off. Note that it may only work if low resolution was set prior to turning on digital zoom, and it only has effect in the same invocation with the snapshot command. Numeric values have model-dependant meaning. πŸ”Ž
  • zoom <mm> β€” sets the optical zoom value on models that support it. πŸ”­

πŸŽ€ EXAMPLES πŸŽ€

% photopc query
% photopc -f "image%H:%M:%S" eraseall snapshot image 1 .

🫢 OTHER NOTES 🫢

The latest version of this tool can be found at http://photopc.sourceforge.net/

Trademarks are properties of their respective owners. πŸ’–


πŸ’€ KNOWN BUGS πŸ’€

On some models, powersaving timeouts are measured not in seconds but in 1/10 sec units. The program reports them as in seconds. πŸ™ƒ

The Llist command relies on the format of the thumbnail image that does not contain the necessary information on some models (e.g. Nikon CP 900), so this command does not work for these models. The List command, on the contrary, does not display useful data on models that do not return it in the register 47 (e.g. Agfa 780). 😭

The program is known to have some timing problems talking to Nikon CP900 when the camera is "napping" in powersaving mode. Until the problem is solved, a workaround is to run the program this way:

$ photopc && photopc <command list>

Nikon seem to have some other problems too, especially when doing "actions" (e.g. snapshots, erase). 😩

Another Nikon problem: if a 32Mb (or bigger?) memry card is inserted, the program cannot get the number of frames taken, and if "all" or "NN-last" range is specified for downloading, the program fails. Specify an explicit range of frames. Also, with any card, the number of frames taken is not updated immediately after the "snapshot" command (the same has been reported for other models). If you find how to find the correct number of frames, please let me know. πŸ™

okay so legally speaking, bestie: this program is copyrighted by Eugene G. Crosser <crosser@average.org> and it's freely distributable 🫢 β€” like, go off, take it, share it. the deets are all in the README file if you wanna read the fine print (yes, actually read it, it's giving receipts).

and the DOS and Windows support has its own separate copyright held by Bruce D. Lightner <lightner@lightner.net> β€” two icons, two copyrights, we love a collab πŸ’…


πŸŽ€ CREDITS πŸŽ€

the way this man page didn't just appear out of thin air... it was originally written by Jeff Tranter <jeff_tranter@pobox.com>, who ALSO contributed a few bugfixes β€” not just writing the docs but fixing the code too?? main character energy fr fr πŸ‘‘

and some of the info about the serial protocol was obtained from Jun-ichiro "itojun" Itoh <itojun@itojun.org>, Thierry Bousch <bousch%linotte.uucp@topo.math.u-psud.fr>, and a whole bunch of other contributors 🌈 β€” shoutout to the whole group chat, y'all ate πŸ’–


🌸 SEE ALSO 🌸

more reading if you're obsessed like me:

  • epinfo(1)
  • strftime(3)
  • the protocol description β€” that's protocol.htm in the source distribution πŸ“„

and that's a wrap, bestie!! ✨ this whole thing is the PhotoPC manipulation tool manual, dated 24 May 1997, and it lives at PHOTOPC(1) in the manual pages πŸ¦‹ go forth and slay those serial cables, ily, mwah πŸ’œπŸ’…πŸŽ€

πŸ“¦ where this page comes from