Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
libksane
Commits
7949d4f8
Commit
7949d4f8
authored
Jun 20, 2021
by
Alexander Stippich
Browse files
always fill the QImage with white when starting a new scan
otherwise, old data from a previous scan is still there
parent
e2d76640
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ksaneimagebuilder.cpp
View file @
7949d4f8
...
...
@@ -57,7 +57,6 @@ void KSaneImageBuilder::start(const SANE_Parameters ¶ms)
pixelLines
=
m_params
.
pixels_per_line
;
}
*
m_image
=
QImage
(
m_params
.
pixels_per_line
,
pixelLines
,
imageFormat
);
m_image
->
fill
(
0xFFFFFFFF
);
if
(
m_image
->
format
()
==
QImage
::
Format_Mono
)
{
m_image
->
setColorTable
(
QVector
<
QRgb
>
({
0xFFFFFFFF
,
0xFF000000
}));
}
...
...
@@ -65,6 +64,7 @@ void KSaneImageBuilder::start(const SANE_Parameters ¶ms)
m_image
->
setDotsPerMeterX
(
dpm
);
m_image
->
setDotsPerMeterY
(
dpm
);
}
m_image
->
fill
(
0xFFFFFFFF
);
m_imageResized
=
false
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment