     
     @inlinable
     @inline(__always)
-    mutating func _read_compact_pixels<T: FixedWidthInteger, R: BinaryFloatingPoint>(_ bitmap: RawBitmap, _ channel_idx: Int, _ is_opaque: Bool, _ : T.Type, _ : R.Type) {
+    mutating func _read_aligned_pixels<T: FixedWidthInteger, R: BinaryFloatingPoint>(_ bitmap: RawBitmap, _ channel_idx: Int, _ is_opaque: Bool, _ : T.Type, _ : R.Type) {
         
         let width = self.width
         let height = self.height
         
         guard bitmap.startsRow < height else { return }
         
+        let bytesPerPixel = bitmap.bitsPerPixel >> 3
+        
         let channel = bitmap.channels[channel_idx]
-        let channel_count = bitmap.channels.count
+        let byteOffset = channel.bitRange.lowerBound >> 3
         
         @inline(__always)
         func _denormalized(_ value: R) -> R {

                
                return image
                
            } else if bitmaps.allSatisfy({ $0.bitsPerPixel == $0.channels.count * 16 && $0.isCompact && $0.channels.allSatisfy { $0.format == .unsigned } }) {
                
                var image = Image<Gray32ColorPixel>(width: width, height: height, resolution: resolution, colorSpace: colorSpace, fileBacked: fileBacked)
                
                for bitmap in bitmaps {
                    image._read_compact_pixels(bitmap, is_opaque, UInt16.self)
                }
                
                if premultiplied {

        
        self.withUnsafeMutableBytes {
            
            guard var dest = $0.baseAddress?.bindMemory(to: R.self, capacity: Pixel.numberOfComponents * $0.count) else { return }
            
            let row = Pixel.numberOfComponents * width
            
            dest += bitmap.startsRow * row
            
            var data = bitmap.data
            
            for _ in bitmap.startsRow..<height {
                
                let _length = min(bitmap.bytesPerRow, data.count)
                guard _length != 0 else { return }
                
                data.popFirst(bitmap.bytesPerRow).withUnsafeBytes { (bytes: UnsafePointer<UInt8>) in
                    
                    var destination = dest
                    var source = UnsafeRawPointer(bytes)
                    let source_end = source + _length
                    
                    for _ in 0..<width {
                        
                        guard source + bytesPerPixel <= source_end else { return }
                        
                        let _destination = destination + channel.index
                        let _source = source + byteOffset
                        
                        switch channel.endianness {
                        case .big: _destination.pointee = _denormalized(R(T(bitPattern: T.BitPattern(bigEndian: _source.bindMemory(to: T.BitPattern.self, capacity: 1).pointee))))
                        case .little: _destination.pointee = _denormalized(R(T(bitPattern: T.BitPattern(littleEndian: _source.bindMemory(to: T.BitPattern.self, capacity: 1).pointee))))
                        }
                        
                        source += bytesPerPixel
                        
                        if is_opaque {
                            destination[Pixel.numberOfComponents - 1] = 1
                        }
                        
                        destination += Pixel.numberOfComponents
                    }
                    
                    dest += row
                }
            }
        }
