ImageGear for C and C++ on Linux v19.10 - Updated
PSB
User Guide > File Formats and Compressions > File Formats > File Formats Reference > PSB

Full Name PSB (Adobe Photoshop Big)
Format ID IG_FORMAT_PSB = 112
File Extension(s) *.psb
Data Type Raster Image
Data Encoding Binary
Color Profile Support Read, Write
Multi-Page Support No
Alpha Channel Support Yes (see Comments for more information).
ImageGear Platforms Support WIN32, WIN64, Unix, Unix64, .NET, .NET64, MAC

ImageGear Supported Versions:

ImageGear Supported Features:

ImageGear Read Support:

ImageGear Write Support:

ImageGear Filter Control Parameters:

Filter Control Parameter Type Default Value Available Values Description
LOAD_FIRST_EXTRA_CHANNEL_AS_ALPHA AT_BOOL FALSE TRUE, FALSE This parameter specifies how ImageGear should load the first extra channel of a PSB image. If FALSE, ImageGear loads all extra channels according to their descriptors in the file header. If the channel contains transparency information, ImageGear loads it as Alpha channel. Otherwise ImageGear loads it as Extra channel. If TRUE, ImageGear loads first extra channel as Alpha channel. This mode provides backward compatibility with previous versions of ImageGear.
READ_LAYER_INDEX INT -1 Any integer, but no more than number of layers When > -1 specifies a zero based index of layer mask image to load, otherwise reads the composition image.
READ_LAYER_MASK AT_BOOL FALSE FALSE,  TRUE When TRUE PSB layer mask images are loaded as usual pages of multi-page file, otherwise layer masks are ignored.
SAVE_THUMBNAIL AT_BOOL FALSE FALSE, TRUE Gets/Sets thumbnail flag. If TRUE then thumbnail will be added to image.
THUMBNAIL_ENABLE AT_BOOL FALSE FALSE, TRUE When TRUE thumbnail reading function loads thumbnail image provided by PSB format.
THUMBNAIL_HEIGHT UINT 64 Any positive value Gets/Sets thumbnail height.
THUMBNAIL_WIDTH UINT 64 Any positive value Gets/Sets thumbnail width.

Comments:

PSB is a newer version of PSD designed for files over 2 gigabytes, supporting up to 300,000 pixels in any dimension. The PSB format is identical to the Photoshop native format (PSD) in many ways.

The PSD file is considered by many in the computer graphics arts community as an industry standard.

The PSD/PSB is organized into 5 major segments of data: the header, 3 informational blocks, and the bitmap data. The short header always contains a "signature" of 8PPS, as well as these fields: width, height, and bit depth of the bitmap.

The first block of informational data is called the "Color Mode Data Block". It begins with a value for the length of the block. If the image has a palette, it is located here.

The next block is called the "Image Resources Block". Like the previous block, it first gives the length of the block. An ID field is filled with one of many possible values that indicate the structure where the data is stored. It may contain such parameters as resolution.

The last informational block is called the "Layer and Mask Instruction Block". After a value for the length of the block, it tells how many "layer records" follow. There is a record for each layer in the image. Each record begins with a channel ID and the length of the data in the record. After the records, a "Layer Mask" section may be stored, if applicable.

The bitmap data represents the last segment of a PSD/PSB file.

For historic reasons, ImageGear uses the IG_COMPRESSION_PACKED_BITS constant for saving Packed Bits compressed PSD/PSB images, and uses the IG_COMPRESSION_RLE constant to report Packed Bits compression when reading PSD/PSB images. For the PSD/PSB format, the terms "Packed Bits" and "RLE" are used synonymously.

References Used

Murray, James D. and William vanRyper. Encyclopedia of Graphics File Formats, 2d ed. Sebastopol, CA: O'Reilly & Associates, Inc., 1996.