---
title: bytesPerRow
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsbitmapimagerep/bytesperrow
---

# bytesPerRow

The minimum number of bytes required to specify a scan line in each data plane.

## Declaration

```swift
var bytesPerRow: Int { get }
```

## Discussion

Discussion A scan line is a single row of pixels spanning the width of the image. If not explicitly set to another value (in init(bitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:)), this number will be figured from the width of the image, the number of bits per sample, and, if the data is in a meshed configuration, the number of samples per pixel. It can be set to another value to indicate that each row of data is aligned on word or other boundaries.

## See Also

### Getting Information About Images

- [bitmapFormat](appkit/nsbitmapimagerep/bitmapformat.md)
- [NSBitmapImageRep.Format](appkit/nsbitmapimagerep/format.md)
- [bitsPerPixel](appkit/nsbitmapimagerep/bitsperpixel.md)
- [bytesPerPlane](appkit/nsbitmapimagerep/bytesperplane.md)
- [isPlanar](appkit/nsbitmapimagerep/isplanar.md)
- [numberOfPlanes](appkit/nsbitmapimagerep/numberofplanes.md)
- [samplesPerPixel](appkit/nsbitmapimagerep/samplesperpixel.md)
