kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Add model flag for inverted output
rodzic
ab1d86d74a
commit
09eaba9606
|
@ -507,6 +507,9 @@ enum class ModelFlag : unsigned
|
||||||
// the head must be reparked between shading scans
|
// the head must be reparked between shading scans
|
||||||
SHADING_REPARK = 1 << 18,
|
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
|
// the scanner outputs 16-bit data that is byte-inverted
|
||||||
SWAP_16BIT_DATA = 1 << 20,
|
SWAP_16BIT_DATA = 1 << 20,
|
||||||
|
|
||||||
|
|
|
@ -544,6 +544,10 @@ Image read_unshuffled_image_from_scanner(Genesys_Device* dev, const ScanSession&
|
||||||
pipeline.push_node<ImagePipelineNodeSwap16BitEndian>();
|
pipeline.push_node<ImagePipelineNodeSwap16BitEndian>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (has_flag(dev->model->flags, ModelFlag::INVERT_PIXEL_DATA)) {
|
||||||
|
pipeline.push_node<ImagePipelineNodeInvert>();
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
if (session.params.depth == 16) {
|
if (session.params.depth == 16) {
|
||||||
pipeline.push_node<ImagePipelineNodeSwap16BitEndian>();
|
pipeline.push_node<ImagePipelineNodeSwap16BitEndian>();
|
||||||
|
@ -1192,6 +1196,10 @@ void build_image_pipeline(Genesys_Device* dev, const ScanSession& session)
|
||||||
"_1_after_swap.pnm");
|
"_1_after_swap.pnm");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (has_flag(dev->model->flags, ModelFlag::INVERT_PIXEL_DATA)) {
|
||||||
|
dev->pipeline.push_node<ImagePipelineNodeInvert>();
|
||||||
|
}
|
||||||
|
|
||||||
if (dev->model->is_cis && session.params.channels == 3) {
|
if (dev->model->is_cis && session.params.channels == 3) {
|
||||||
dev->pipeline.push_node<ImagePipelineNodeMergeMonoLines>(dev->model->line_mode_color_order);
|
dev->pipeline.push_node<ImagePipelineNodeMergeMonoLines>(dev->model->line_mode_color_order);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue