Using Digital Still Photography Devices with GNU/Linux

The remarks on this page should apply to most computers equipped with a USB port or PCMCIA (PC Card) slot.

If you run GNU/Linux, plan to buy a new digital camera, and can't find a camera with CompactFlash or USB mass storage support, I recommend that you buy a PTP-enabled (ISO 15740 baseline conformant) USB camera that can be operated with gphoto2, ptpcam or jphoto. This is a way to stand up for platform neutrality and cross-platform interoperability, as many digital camera manufacturers still refuse to openly share details about camera communication with their customers and millions of users who run free operating systems.

Visit the incomplete list of PTP Camera Models.

Please consider my RFC on Digital Film Mount Point.


News

2004-05-26: James Davis has started a project to develop more support in Free software for the Nikon D70. More details at http://www.fsck.org.uk/GPLNikon/

2003-07-03: The Konica Revio C2 supports USB Mass Storage, according to Goran Brante:

2003-06-08: Added an incomplete listing of PTP Camera Models from Kodak, HP, Sony, Nikon, and Canon.

2003-05-28: The PTP (ISO 15740) standard is fortunately becoming widely supported by most digital still photography devices sold today. Mariusz Woloszyn has announced the 1.0pre3 release of the libptp2 library and ptpcam tool. The package tar-ball is available from http://sf.net/projects/libptp and contains libptp2 (the same code used in ptp2 gphoto2 driver) and ptpcam, a useful tool used to tweak PTP camera properties.

2003-05-14: Dag Gullberg asks: "Does the USB Mass Storage Card concept work in Linux for "cardless" cameras with only internal memory, such as the Konica Revio C2? If not, where can I find info on how to deal with the situation?"

2003-03-29: Mario Lopez writes: "I found a way to get the raw file out of a hewlett packard photosmart 330, there is an administration mode, where you can change the (automatic) settings, and you are able to get the camera to make an interlaced raw image, apparently a higher quality jpg?, and also a two field raw image, where it creates a jpg and a seperate file that shows up as ????_b8.raw that can be accessed when the camera is set on harddrive mode."

2003-03-28: The Fujifilm Finepix 1300 supports USB storage

2003-03-07: The Nixon Coolpix 2500 supports PTP as well as USB Mass Storage (default).

2003-02-19: To use a Konica KD-200Z camera with the latest Linux kernels (2.4.18, 2.4.19, 2.4.20), check out the patch and instructions on Using a Konica KD-200Z Camera with Linux provided by Jan Willamowius.

2003-02-18: Check out the Student Photo Essays from Riverdale High School. The software used to create the pages and edit the photographs is free.


Table of Contents

The first two sections about CompactFlash and IBM Microdrive storage media for digital cameras is for those who wish to utilize maximum data transfer rate and save the battery power in the camera's batteries when transferring pictures to a computer running a GNU/Linux system.

CompactFlash

Software Configuration
Using the CompactFlash PCMCIA Adapter
Camera Models

IBM Microdrive

Camera Models

USB Mass Storage

The third section covers digital cameras that support the USB mass storage standard. These ought to just work with GNU/Linux without any problems.

Software Configuration
Camera Models

gphoto

The fourth section covers gphoto2, free software for various serial and USB cameras.

Software Configuration
Common Problems
Camera Models

ptpcam

PTP Camera Models

ptpcam is a useful tool used to tweak PTP camera properties.

jphoto

PTP Camera Models

The sixth and last section covers jphoto, free Java software for PTP/ISO 15740 enabled USB cameras.

Secret Raw CMOS Sensor Data File Formats

Be aware of secret raw CMOS sensor data file formats.

Why Support for RAW formats in free software is desirable
Formats
Camera Models

SmartMedia™

Storage card promoted by the SSFDC Forum, somewhat used by Fuji and Olympus.


If you have a digital camera that supports one of the first two methods below, you don't need extra user space software under GNU/Linux to extract the files, and there is no difficulty in terms of needing drivers and information that is specific to the camera.


CompactFlash

Today many digital still cameras are using CompactFlash memory. CompactFlash is a small removable mass storage device. The specification is available from the CompactFlash Association web site: http://www.compactflash.org/

There are adapters available to put CompactFlash memory into PCMCIA slots (approx. $15 US for a RealVision or Sandisk PCMCIA adapter) and USB ones.

This method of picture access only allows for storage, retrieval, and deletion of images on a CompactFlash Card. These instructions are tested with a Kodak 16 MB Picture Card and a SanDisk CompactFlash PCMCIA Adapter on the IBM Thinkpad 560X notebook computer.

Software Configuration

This page assumes a working knowledge of Linux kernel and user-space program compilation under the GNU system.

Get the latest version of PCMCIA-CS.

Select the following to be built as either modules or part of your kernel:

DOS FAT fs support
VFAT (Windows-95) fs support

Reboot the system and then load the created modules each time access to the CompactFlash card is desired if the support is not compiled into the Linux kernel. To load the modules do the following:

/sbin/insmod /lib/modules/$(uname -r)/fat.o
/sbin/insmod /lib/modules/$(uname -r)/vfat.o

Compile and configure PCMCIA-CS. This part of the process is beyond the scope of this document, however there is a document with such information that can be found in the PCMCIA-HOWTO. There is also most likely a pre-packaged version for the distribution of GNU/Linux the computer is running. This step can be greatly simplified if a pre-packaged version is used.

Using the CompactFlash PCMCIA Adapter

Create a directory to mount the CompactFlash Card to.

mkdir -p /mnt/film

Insert the CompactFlash Card into the CompactFlash PCMCIA Adapter (both should face the same direction).

Insert the CompactFlash PCMCIA Adapter into the PC-Card slot of the notebook computer.

Mount the CompactFlash PCMCIA Adapter to /mnt/film (The CompactFlash Card PCMCIA Adapter is assigned its device by figuring out how many IDE controllers are on the system, and then assigning it the next device. For example, if a system were to have 2 IDE controllers, and would thus have /dev/hda /dev/hdb /dev/hdc and /dev/hdd assigned to the current controllers, the CompactFlash Card PCMCIA Adapter would be assigned /dev/hde1.).

mount -t vfat /dev/hde1 /mnt/film

From this point the files can be copied, moved, deleted, and renamed as done on a normal filesystem. Information regarding file management commands may be found in the documentation included with the GNU/Linux distribution used, such as texinfo documentation. The documentation pages which list the commands to use to do the above procedures can be accesses by typing the following to get the command's respective info entry: 'info cp', 'info mv', 'info rm'. Before removing the CompactFlash Card PCMCIA Adapter always remember to unmount it with the following command:

umount /mnt/film

At this point the CompactFlash Card PCMCIA Adapter can be removed from the PCMCIA Reader and the CompactFlash Card and be removed from the CompactFlash Card PCMCIA Adapter.

If you have compiled in vfat support in the Linux kernel, you can append the following line to the file /etc/fstab :

/dev/film       /mnt/film       vfat         rw,noauto,user  0   0

Now every user of the computer can access the card just by typing

mount /mnt/film

Camera Models

There exists two types of CompactFlash cards; the old Type I and Type II. See http://www.compactflash.org/guide/ for a list of various digital camera models that use CompactFlash Type II memory cards.


IBM Microdrive

The IBM 170 MB, 340 MB, 512 MB or 1 GB Microdrive can be used in most digital cameras equipped with a CompactFlash Type II slot or a PC ATA Type II card slot. It can also be used in PDAs, laptops or PC systems with PCMCIA card slots. The instructions for mounting CompactFlash Type II cards under GNU/Linux in the first section also applies for Microdrives.

A Microdrive is in the same size case as a solid state CompactFlash card.

The IBM Microdrive "Travel Kit" includes the Microdrive, PCMCIA adapter and rugged plastic cases for both the Microdrive by itself and with the PCMCIA adapter.

IBM Microdrives can *not* be used in digital cameras that have only a single CompactFlash Type I slot. Even though a camera has a CompactFlash Type II card slot that does not necessarily mean that it is Microdrive compatible. There are power consumption and BIOS parameters to consider.

There is a page with reports on IBM Microdrive reliability at http://www.robgalbraith.com/reports/microdrive_feedback.html

Camera Models

Canon Pro 70
Canon Pro 90 IS
Canon PowerShot G1
Canon Powershot G2
Canon S10 after the firmware upgrade
Canon S20
Canon PowerShot S30
Canon Powershot S40
Canon EOS-1D
Canon EOS D30
Casio QV2000UX
Casio QV-2300UX
Casio QV-2800UX
Casio QV-2900UX
Casio QV3EX
Casio QV3000EX
Casio QV3500EX
Casio QV4000
Fuji S1 Pro
Hitachi MP-EG10W
Kodak Professional DCS 620
Kodak Professional DCS 620x
Kodak Professional DCS 760
Minolta DiMAGE 5
Minolta DiMAGE 7
Minolta RD3000
Nikon Coolpix 995
Nikon Coolpix 5000 (firmware version 1.7 support PTP)
Nikon D1
Nikon D1H
Nikon D1X
Olympus E-20
Sanyo VPC-SX500


USB Mass Storage

Many new digital still cameras exhibit a USB interface which is a USB "mass storage" device. On GNU/Linux, you deal with this exactly like other USB mass storage devices, such as a USB floppy drive.

See Accessing Digital Photography Storage Cards with GNU/Linux for some quick details on how to configure a such USB Mass Storage device.

Software Configuration

This method requires a recent Linux 2.4 kernel compiled with USB support. For more information on using USB devices on GNU/Linux you should have a look at http://www.linux-usb.org/

You need to build the Linux kernel modules usb-uhci and usb-storage. You also need SCSI in your kernel, since the USB implementation makes the USB mass storage device look like a logical SCSI device. Once these are loaded into the kernel, the device appears as /dev/sda1. You mount this "as usual" and proceed to read files, delete files, etc. If your digital camera exhibits a VFAT file system (like the Olympus D-510 does), you'll need kernel support for the vfat file system as described above.

In the following let's assume that you already have one SCSI disk in your system and so you access the storage as /dev/sdb1. To create a mount point for your camera you have to type:

mkdir -p /mnt/film

Then append the following line to the file /etc/fstab :

/dev/sdb1       /mnt/film       vfat         rw,noauto,user  0   0

Now every user can mount the storage of the camera by typing

mount /mnt/film

WARNING: It is dangerous to mount the camera, modify the files, and then unplug the camera and walk away! The file system may be in an inconsistent state because of write caching on GNU/Linux. People have had serious problems with this, so things can go wrong. Always umount the storage device before you unplug the camera and walk away:

umount /mnt/film

To use a Konica KD-200Z camera with the latest Linux kernels (2.4.18, 2.4.19, 2.4.20), check out the patch and instructions on Using a Konica KD-200Z Camera with Linux provided by Jan Willamowius.

There is a page contains information regarding Casio QV 3/2x00/3x00/4000/8000 cameras at http://www.harald-schreiber.de/

Also, check out the Hans Persson's Linux driver for the USBAT-02 CompactFlash reader.

Camera Models

Casio QV 2x00/3x00/4000/8000
FinePix [1400,2400,4700]Zoom, 1300, 2800 Zoom, 4500
HP PhotoSmart 315, 618, 912
Leica Digilux 4.3
Kyocera Finecam s3
Konica KD300
Minolta Dimage 7
Nikon Coolpix 995
Nikon Coolpix 2500
Nikon D70
Olympus C1, C-100, C-200Z, C-700, C-860L, C-2040, C-3040Z, D-510, E-10
Sony DSC-F505(V), DSC P5, DSC-F707


gphoto2

Note: See The gPhoto2 Manual for recent instructions!

Software Configuration

You need a system kernel that support USB access through the libusb userspace library. Currently libusb supports Linux and *BSD kernels.

If you run a Linux-based system, it means you also need USB Device Filesystem (USBDEVFS) support built in the kernel. Get the latest stable Linux kernel from www.kernel.org.

If you need any further assistance, I recommend the Linux-USB-Guide for kernel USB configuration issues.

(Hint: You may have to add alias usb-controller usb-uhci in /etc/modules.conf.)

When you have compiled the new kernel, reboot the machine and check /var/log/messages before and after you plug in a new USB device, and turn on the power.

If you see output like

Dec 29 10:32:11 diff kernel: hub.c: USB new device connect on bus1/1, assigned device number 2
Dec 29 10:32:11 diff kernel: usb.c: USB device 2 (vend/prod 0x81e/0x1) is not claimed by any active driver.

then you're close.

USB device and driver information is stored in the USBDEVFS filesystem, which is somewhat like /proc

It is usually mounted at /proc/bus/usb

You should mount it manually by doing

mount -t usbdevfs /proc/bus/usb

or alternatively add this in /etc/fstab

none   /proc/bus/usb  usbdevfs        defaults        0   0

When the USB Dev FS is mounted, you will observe at least two files (devices and drivers) and a directory, which name is 001, the device number for the 'virtual root hub' to which the other USB devices (like hardware USB hubs) get connected.

You can verify whether you've successfully connected a USB device, by looking at the devices file.

cat /proc/bus/usb/devices

If everything is ok, you'll see entries for the virtual root hub and the device you plugged in (the example below is for a KBGear JamCam digital camera):

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI-alt Root Hub
S:  SerialNumber=dce0
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=ff(vend.) Sub=01 Prot=ff MxPS= 8 #Cfgs=  1
P:  Vendor=084e ProdID=0001 Rev= 1.00
S:  Manufacturer=KBGear Interactive
S:  Product=JamCam
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=01 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS=   8 Ivl=255ms

The device entry will disappear if you unplug or poweroff the device.

Now that devices are being detected, it's time to grab some additional software in order to retrieve pictures from the camera. gphoto2, a digital camera library (released under the GNU Lesser General Public License), supports most USB cameras, with some exceptions.

This was tested with the 2.1.0 version (from Sourceforge). In order to get it to compile, you'll need to compile and install libusb 0.1.6 first.

You need this even though USB support is in the kernel already.

Once libusb is installed, compile and install gphoto2 following the instructions provided.

./configure; make; make install

gphoto2 provides a command line tool for operating some digital cameras. After installation, check for USB support by doing

gphoto2 --list-ports

The output should be along the lines of:

Devices found: 5
Path                             Description
--------------------------------------------------------------
serial:/dev/ttyS0                Serial Port 0
serial:/dev/ttyS1                Serial Port 1
serial:/dev/ttyS2                Serial Port 2
serial:/dev/ttyS3                Serial Port 3
usb:                             Universal Serial Bus

Next, you should do

gphoto2 --list-cameras

to see the list of supported cameras. Find the name of your camera, according to gphoto2. Now comes the exciting part, retrieving images.

Go into the directory that you wish to download images to, and type

gphoto2 --camera "camera name" --port usb: -P

where "camera name" represents the name of your camera. E.g, for the KBGear JamCam, you'd do

gphoto2 --camera "KBGear JamCam v3.0" --port usb: -P

At this point the camera should begin downloading images into the directory.

Common Problems

If you see a message like 'Unknown port' from gphoto2, it either means that you typed the port argument (--port usb:) incorrectly, or that gphoto2's USB support didn't make it into a compile somehow (if there's no mention of USB when doing gphoto2 --list-ports, above, this is your problem). Try the alternate installation steps for gphoto2 above, and give it another go.

The error message gPhoto2 reported the error 'Could not find the requested device on the USB port' typically means that the USB camera isn't turned on or plugged in.

If you see the following errors:

gp_port_usb_open: could not claim intf 0: Operation not permitted
gp_port_usb_update: could not set config 0/1: Operation not permitted
gp_port_usb_close: could not release interface 0: Operation not permitted
gPhoto2 reported the error 'Error updating the port settings'

it generally means that you need to alter the permissions of your USB device entry.

Try

su -c 'chmod a+w /proc/bus/usb/001/002'

where 002 is the device number of your USB camera. This number is easy to find out. Run

ls /proc/bus/usb/001

Look for the non-001 entry.

Camera Models

Note: See SUPPORTED-CAMERAS for a recent list of supported cameras.

Agfa ePhoto CL18 (Vince)
Agfa ePhoto 1280 (Kuleuven)
Agfa ePhoto 1680 (Juri Munkki)
Agfa ePhoto 307 (AboutLinux)
Agfa ePhoto 780 (Rene Reindal)
Agfa ePhoto 780C
Aiptek PenCam Trio (EXPERIMENTAL)
Apple QuickTake 200
Argus DC-100 (TESTING)
Argus DC-2000 (TESTING)
Barbie
Canon Digital IXUS
Canon Digital IXUS 300
Canon DIGITAL IXUS v
Canon Digital Ixus v2 (CVS)
Canon EOS D30
Canon IXY DIGITAL
Canon IXY DIGITAL 300
Canon PowerShot A10
Canon PowerShot A20
Canon PowerShot A5
Canon PowerShot A5 Zoom
Canon PowerShot A50
Canon PowerShot G1
Canon PowerShot G2
Canon PowerShot Pro70
Canon PowerShot Pro90 IS
Canon PowerShot S10
Canon PowerShot S100
Canon PowerShot S110 (Obi-Wan)
Canon PowerShot S20
Canon PowerShot S200 (CVS)
Canon PowerShot S300
Casio QV10 (EXPERIMENTAL)
Casio QV100 (EXPERIMENTAL)
Casio QV10A (EXPERIMENTAL)
Casio QV300 (EXPERIMENTAL)
Casio QV70 (EXPERIMENTAL)
Casio QV700 (EXPERIMENTAL)
Casio QV770 (EXPERIMENTAL)
Chinon ES-1000
Directory Browse
Epson PhotoPC 3000z
Epson PhotoPC 500
Epson PhotoPC 550
Epson PhotoPC 600
Epson PhotoPC 700
Epson PhotoPC 800
Hot Wheels
HP PhotoSmart 318 (EXPERIMENTAL)
HP PhotoSmart 618
HP PhotoSmart C20
HP PhotoSmart C200
HP PhotoSmart C30
I/O Magic MagicImage 420 (TESTING)
Jenoptik JD11 (TESTING)
Jenoptik JD350 entrance (EXPERIMENTAL)
KBGear JamCam
Kodak DC-240 (PTP) (EXPERIMENTAL)
Kodak DC-4800 (EXPERIMENTAL)
Kodak DC120
Kodak DC220
Kodak DC240
Kodak DC260
Kodak DC265
Kodak DC280
Kodak DC290
Kodak DC3200
Kodak DC3400
Kodak DC5000
Kodak DX-3500 (EXPERIMENTAL)
Kodak DX-3600 (EXPERIMENTAL)
Kodak DX-3900 (EXPERIMENTAL)
Kodak MC3 (EXPERIMENTAL)
Konica Q-EZ
Konica Q-M100
Konica Q-M100V
Konica Q-M200
Micromaxx Digital Camera (EXPERIMENTAL)
Minolta Dimage V
Mustek VDC-3500
Nick Click
Nikon CoolPix 100
Nikon CoolPix 300
Nikon CoolPix 600
Nikon CoolPix 700
Nikon CoolPix 800
Nikon CoolPix 880
Nikon CoolPix 900
Nikon CoolPix 900S
Nikon CoolPix 910
Nikon CoolPix 950
Nikon CoolPix 950S
Nikon CoolPix 990
Nikon D70
Olympus C-1000L
Olympus C-1400L
Olympus C-1400XL
Olympus C-2000Z
Olympus C-2020Z
Olympus C-2040Z
Olympus C-2100UZ
Olympus C-2500Z
Olympus C-3000Z
Olympus C-3030Z
Olympus C-400
Olympus C-400L
Olympus C-410
Olympus C-410L
Olympus C-420
Olympus C-420L
Olympus C-800
Olympus C-800L
Olympus C-820
Olympus C-820L
Olympus C-830L
Olympus C-840L
Olympus C-900 Zoom
Olympus C-900L Zoom
Olympus D-100Z
Olympus D-200L
Olympus D-220L
Olympus D-300L
Olympus D-320L
Olympus D-330R
Olympus D-340L
Olympus D-340R
Olympus D-360L
Olympus D-400L Zoom
Olympus D-450Z
Olympus D-460Z
Olympus D-500L
Olympus D-600L
Olympus D-600XL
Olympus D-620L
Panasonic Coolshot KXL-600A
Panasonic Coolshot KXL-601A
Panasonic Coolshot NV-DCF5E
Panasonic DC1000
Panasonic DC1580
Panasonic PV-L859
Polaroid 640SE (EXPERIMENTAL)
Polaroid DC700
Polaroid Fun Flash 640 (EXPERIMENTAL)
Polaroid Fun! 320 (EXPERIMENTAL)
Polaroid PDC 640
Quark Probe 99 (TESTING)
Relisys Dimera 3500
Samsung digimax 800k (EXPERIMENTAL)
Sanyo DSC-X300
Sanyo DSC-X350
Sanyo VPC-G200
Sanyo VPC-G200EX
Sanyo VPC-G210
Sanyo VPC-G250
Sierra Imaging SD640
Sony DSC-F1
Sony DSC-F55
Sony DSC-F707 (EXPERIMENTAL)
Sony DSC-P5 (EXPERIMENTAL)
Sony MSAC-SR1
STM USB Dual-mode camera (EXPERIMENTAL)
STV0680 (EXPERIMENTAL)
Trust DC-3500
WWF


ptpcam

Mariusz Woloszyn wrote the libptp2 library and ptpcam tool. The package is available from http://sf.net/projects/libptp and contains libptp2 (the same code used in ptp2 gphoto2 driver) and ptpcam, a useful tool used to tweak PTP camera properties.

libptp2 is written in pure C, and requires libusb (http://libusb.sourceforge.net/) to build. You can obtain libptp2 from http://sourceforge.net/projects/libptp

See PTP Camera Models for a list of devices supported by ptpcam.

jPhoto

jphoto is a PTP implementation and a command line camera access tool written in Java (compiles natively using a GCC Java Compiler) by David Brownell and released as free software under the GNU GPL.

PTP is the acronym for the Picture Transfer Protocol. The protocol has a strong standards basis, in ISO, and in terms of the USB Still Imaging class specification. Kodak has its own Developer Relation Group and publishes specs (with some exceptions), so it makes sense to do business with them for free software users.

The jphoto web site is: http://jphoto.sourceforge.net/

PTP Camera Models

ModelVendor IDProduct ID
Kodak DC240 (PTP) 0x040a 0x0121
Kodak DC4800 0x040a 0x0160
Kodak DX3215 0x040a 0x0525
Kodak DX3500 0x040a 0x0500
Kodak DX3600 0x040a 0x0510
Kodak DX700 0x040a 0x0530
Kodak DX3900 0x040a 0x0170
Kodak DX4230 0x040a 0x0535
Kodak DX4300 0x040a 0x0566
Kodak DX4330 0x040a 0x0555
Kodak DX4900 0x040a 0x0550
Kodak MC3 0x040a 0x0400
Kodak LS420 0x040a 0x0540
Kodak LS443 0x040a 0x0568
Kodak CX4200 0x040a 0x0560
Kodak CX4210 0x040a 0x0560
Kodak CX4230 0x040a 0x0535
Kodak CX4300 0x040a 0x0566
HP PhotoSmart 120 0x03f0 0x6502
HP PhotoSmart 318 0x03f0 0x6302
HP PhotoSmart 320 0x03f0 0x6602
HP PhotoSmart 612 0x03f0 0x6302
HP PhotoSmart 715 0x03f0 0x6402
HP PhotoSmart 720 0x03f0 0x6702
HP PhotoSmart 850 0x03f0 0x4302
Sony DSC-CD300 0x054c 0x004e
Sony DSC-F505 0x054c 0x004e
Sony DSC-F505V 0x054c 0x004e
Sony DSC-F707 0x054c 0x004e
Sony DSC-F707V 0x054c 0x004e
Sony DSC-P5 0x054c 0x004e
Sony DSC-P30 0x054c 0x004e
Sony DSC-P50 0x054c 0x004e
Sony DSC-P71 0x054c 0x004e
Sony DSC-S75 0x054c 0x004e
Sony DSC-S85 0x054c 0x004e
Sony MVC-CD300 0x054c 0x004e
Nikon DSC D100 0x04b0 0x0402
Nikon Coolpix 2500 0x04b0 0x0109
Nikon Coolpix 5700 0x04b0 0x010d
Nikon Coolpix 4300 0x04b0 0x010f
Nikon Coolpix 885 0x04b0 0x0112
Nikon D70 0x04b0 0x0406
Canon PowerShot S45 0x04a9 0x306d
Canon PowerShot G3 0x04a9 0x306f
Canon PowerShot S230 0x04a9 0x3071
Canon Digital IXUS v3 0x04a9 0x3071
Canon PowerShot A70 0x04a9 0x3073

Secret Raw CMOS Sensor Data File Formats

I'm collecting information and samples of proprietary RAW formats from digital still photography devices. Their usage seems to be increasing with the new high-resolution cameras.

Unfortunately, there is no universally accepted RAW standard format, so each manufacturer format (even on model basis) differs.

Simply put, image files in RAW format contain raw data (Bayer array) directly from a CMOS sensor; pure, unprocessed and lossless, opposed to typical JPEGs, where lossy compression is used to reduce file size (and quality).

Why Support for RAW formats in free software is desirable

From RAW data, images can be individually customied, different versions of the same image can be created and compared. In addition, any noise in images taken at higher ISO (typically 800 and 1600) can be significantly reduced by saving in RAW format vs. JPEG.

As the CMOS sensor data is stored in a lossless format, no data is thrown away, allthough obfuscated with proprietary compression algorithms.

In the case of Canon's RAW formats, they use (until recently) a secret, proprietary compression algorithm, that reduces the file size greatly.

Formats

After some quick research on RAW formats I found these:

CRW (Canon EOS-1D)

Canon EOS cameras store a pair of CRW and THM files for each image on the file system.
The CRW contain the CMOS sensor data itself along with shooting parameters (unfortunately stored in non-EXIF format). This data includes date and time of shooting, f-stop, ISO level, shutter-speed, and various of details on camera settings.
The THM contains a small thumbnail image in JPEG (160x120 pixels) with the EXIF data appended.
The RAW .CRW format used by Canon EOS D30 and D60 contain JPEG. The D60's hidden JPEG is over 2000 pixels wide according to a web site on RAW formats.

Public domain implementation (crw.c) in ANSI C by David Coffin

crw.c supports all 15 Canon and Nikon cameras that produce raw files. It does not support any Kodak or Minolta cameras, but David Coffin has expressed interest in adding them if any camera owners want to work with him.

NEF (Nikon D1X)

Nikon Electronic Image Format

Public domain implementation (crw.c) in ANSI C by David Coffin

DeNEF by Daniel Stephens reads uncompressed NEF files, but crw.c by David Coffin reads compressed NEF as well, and has a better demosaic algorithm.

DCR

Kodak Professional DCR, proprietary RAW format, despite TIF extension.

No efforts to reverse-engineer this AFAIK.

MRW

Minolta Dimage 7, proprietary RAW format.

Reverse-engineered by Paul K. Hansen!
http://webpages.charter.net/bbiggers/DCExperiments/html/body_mrw_file_format.html

No free implementation yet.

Some RAW formats, like the ones by Nikon in their D1-series cameras, Kodak in their DCS cameras, and Canon in EOS-1D, are disguised as a TIFF, but the data is still proprietary.

Camera Models

Canon PowerShot 600
Canon PowerShot A5
Canon PowerShot A50
Canon PowerShot Pro70
Canon PowerShot Pro90
Canon PowerShot G1
Canon PowerShot G2
Canon PowerShot EOS-D30
Canon PowerShot S40
Canon PowerShot S30
Canon EOS D60
Canon EOS-1D
Kodak DCS series
Minolta Dimage 7
Nikon D1X
Nikon D1
Nikon D1H
Nikon D70

Please notify me, if you are aware of specific models that only store raw data in other secret formats, to get the word out about the implifications for free software users. Thanks in advance!


SmartMedia™

SmartMedia™ is a removable Digital Photography Storage Card standard promoted by SSFDC Forum in Japan. The standard seems to be used in a couple of devices manufactured by Fuji and Olympus.

If you have any details on SmartMedia™ reader compatibility and supported devices, please submit the details.


Thanks

I'd like to thank Simon N Goodwin <simon.at.studio.woden.com>, rupe (from The Yak's Frequently Questioned Answers (mod.2002-02-26)), David M. Burley <khemicals.at.stampede.org> and Jan Willamowius for input, and Richard M. Stallman <rms.at.gnu.org> for his idea of creating this page.


Valid XHTML 1.0 Strict

Last modified: Thu Mar 15 17:04:38 CET 2018
http://www.aamot.org/ole/ole.html
Ole Aamot <ole AT aamot DOT org>