public PlanarYUVLuminanceSource createSource() {
        RawImageData rotated = this.data.rotateCameraPreview(rotation);
        RawImageData scaled = rotated.cropAndScale(this.cropRect, this.scalingFactor);

        // not the preview for decoding.
        return new PlanarYUVLuminanceSource(scaled.getData(), scaled.getWidth(), scaled.getHeight(), 0, 0, scaled.getWidth(), scaled.getHeight(), false);
    }
@return true if the preview image is rotated orthogonal to the display
zxing-android-embedded/src/com/journeyapps/barcodescanner/SourceData.java