IJ2 is out
 Sec. 6: Undo & Redo Up Part II: Working with IJ Sec. 8: Stacks & Hyperstacks 

7 Image Types and Formats

Digital Images are two-dimensional grids of pixel[?] intensities values with the width and height of the image being defined by the number of pixels in x (rows) and y (columns) direction. Thus, pixels (picture elements) are the smallest single components of images, holding numeric values — pixel intensities — that range between black and white. The characteristics of this range, i.e., the number of unique intensity (brightness) values that can exist in the image is defined as the bit[?]--depth of the image and specifies the level of precision in which intensities are coded, e.g.: A 2-bit image has 22 = 4 tones: 00 (black), 01 (gray), 10 (gray), and 11 (white). A 4-bit image has 24 = 16 tones ranging from 0000 (0) to 1111 (16), etc. In terms of bits per pixel (bpp[?]), the most frequent types of images (ImageType) that ImageJ deals with are (ImageJ2↑ supports many more types of image data):
8-bit Images that can display 256 (28) gray levels (integers only).
16-bit Images that can display 65, 536 (216) gray levels (integers only).
32-bit Images that can display 4, 294, 967, 296 (232) gray levels (real numbers). In 32-bit images, pixels are described by floating point values and can have any intensity value including NaN[?] (Not a Number).
RGB Color Color Images↓ that can display 256 values in the Red, Green and Blue channel. These are 24-bit (23 × 8) images. RGB[?] color images can also be 32-bit color images (24-bit color images with additional eight bits coding alpha blending values, i.e., transparency).

Native Formats

Natively (i.e. without the need of third-party plugins) ImageJ opens the following formats: TIFF[?], GIF[?], JPEG[?], PNG[?], DICOM[?], BMP[?], PGM[?] and FITS[?]. Many more formats are supported with the aid of plugins. These are discussed in Non--native Formats ↓.
TIFF (Tagged Image File Format) is the ‘default’ format of ImageJ (cf. FileSave [s]↓). Images can be 1-bit, 8-bit, 16-bit (unsigned [C]  [C] A numeric variable is signed if it can represent both positive and negative numbers, and unsigned if it can only represent positive numbers.), 32-bit (real) or RGB color. TIFF files with multiple images of the same type and size open as Stacks↓ or Hyperstacks↓. ImageJ opens lossless compressed TIFF files (see 3: Image Types: Lossy Compression and Metadata↓) by the LZW[?], PackBits and ZIP (Deflate/Inflate) [2] compression schemes. In addition, TIFF files can be opened and saved as ZIP archives.
Tiff tags and information needed to import the file (number of images, offset to first images, gap between images) are printed to the Log Window↓ when ImageJ is running in Debug Mode (EditOptionsMisc…↓, see Settings and Preferences↓).
DICOM (Digital Imaging and Communications in Medicine) is a standard popular in the medical imaging community. Support in ImageJ is limited to uncompressed DICOM files. DICOM files containing multiple images open as Stacks↓.
Use ImageShow Info… [i] to display the DICOM header information. A DICOM sequence can be opened using FileImportImage Sequence… or by dragging and dropping the folder on the ‘ImageJ’ window. Imported sequences are sorted by image number instead of filename and the tags are preserved when DICOM images are saved in TIFF format. ImageJ supports custom DICOM dictionaries, such as the one at ../../download/docs/DICOM_Dictionary.txt. More information can be found at the Center for Advanced Brain Imaging.
FITS (Flexible Image Transport System) image is the format adopted by the astronomical community for data interchange and archival storage. Use ImageShow Info… [i] to display the FITS header. More information here.
PGM (Portable GrayMap), PBM[?] (Portable BitMap) and PPM[?] (Portable PixMap) are simple image formats that use an ASCII[?] header. More information here.
AVI (Audio Video Interleave) is a container format which can contain data encoded in many different ways. ImageJ only supports uncompressed AVIs, various YUV 4:2:2 compressed formats, and PNG or JPEG-encoded individual frames. Note that most MJPG[?] (motion-JPEG) formats are not read correctly. Attempts to open AVIs in other formats will fail.

Non--native Formats

When opening a file, ImageJ first checks whether it can natively handle the format. If ImageJ does not recognize the type of file it calls for the appropriate reader plugin using HandleExtraFileTypes, a plugin bundled with ImageJ. If that fails, it tries to open the file using the OME Bio-Formats library (if present), a remarkable plugin that supports more than one hundred of the most common file formats used in microscopy. If nevertheless the file cannot be opened, an error message is displayed.
Because both these plugins are under active development, it is important that you keep them updated. The OME Bio-Formats library can be updated using its self-updating plugin (PluginsLOCIUpdate LOCI Plugins…) or Fiji↑'s built-in updater (HelpUpdate Fiji…). The following websites provide more information on the Bio-Formats plugins:
In addition, the ImageJ web site lists more than sixty plugins that recognize more ‘exotic’ file formats. The ImageJ Documentation Portal also maintains a (somewhat outdated) list of file formats that are supported by ImageJ.
3 Image Types: Lossy Compression and Metadata
Two critical aspects to keep in mind when converting images:
Lossy compression Transcoding an image into a format that uses lossy compression will alter the original data, introducing artifacts (see 11: Warning on JPEG Compression↓). This is the case, e.g., for JPEG formats (with the exception of some JPEG2000 images that use lossless compression). As such, these types of data are intended for human interpretation only and are not suitable for quantitative analyses
Metadata In ImageJ, metadata associated with the image, such as scale, gray value calibration and user comments is only supported in tiff and zip (compressed tiff) images. In addition, selections and Overlays↓ are also saved in the TIFF header (cf. FileSave [s]↓). None of the above is saved in other formats (cf. Native Formats↑).
 Sec. 6: Undo & Redo Up Part II: Working with IJ Sec. 8: Stacks & Hyperstacks