diff --git a/backend/genesys/enums.h b/backend/genesys/enums.h index 08d58ab7d..619e7c098 100644 --- a/backend/genesys/enums.h +++ b/backend/genesys/enums.h @@ -507,6 +507,9 @@ enum class ModelFlag : unsigned // the head must be reparked between shading scans SHADING_REPARK = 1 << 18, + // the scanner outputs inverted pixel data + INVERT_PIXEL_DATA = 1 << 19, + // the scanner outputs 16-bit data that is byte-inverted SWAP_16BIT_DATA = 1 << 20, diff --git a/backend/genesys/low.cpp b/backend/genesys/low.cpp index 79dc84b49..1730b7691 100644 --- a/backend/genesys/low.cpp +++ b/backend/genesys/low.cpp @@ -544,6 +544,10 @@ Image read_unshuffled_image_from_scanner(Genesys_Device* dev, const ScanSession& pipeline.push_node(); } + if (has_flag(dev->model->flags, ModelFlag::INVERT_PIXEL_DATA)) { + pipeline.push_node(); + } + #ifdef WORDS_BIGENDIAN if (session.params.depth == 16) { pipeline.push_node(); @@ -1192,6 +1196,10 @@ void build_image_pipeline(Genesys_Device* dev, const ScanSession& session) "_1_after_swap.pnm"); } + if (has_flag(dev->model->flags, ModelFlag::INVERT_PIXEL_DATA)) { + dev->pipeline.push_node(); + } + if (dev->model->is_cis && session.params.channels == 3) { dev->pipeline.push_node(dev->model->line_mode_color_order); }