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
0454ecf1
Commit
0454ecf1
authored
Jul 27, 2021
by
Kåre Särs
Browse files
Fix color channels being swapped
parent
8f338bda
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ksanewidget_p.cpp
View file @
0454ecf1
...
@@ -1043,11 +1043,11 @@ void KSaneWidgetPrivate::imageReady(const QImage &image)
...
@@ -1043,11 +1043,11 @@ void KSaneWidgetPrivate::imageReady(const QImage &image)
}
}
case
KSaneWidget
::
FormatRGB_8_C
:
{
case
KSaneWidget
::
FormatRGB_8_C
:
{
for
(
int
y
=
0
;
y
<
image
.
height
();
y
++
)
{
for
(
int
y
=
0
;
y
<
image
.
height
();
y
++
)
{
const
uchar
*
line
=
image
.
scanLine
(
y
);
const
QRgb
*
line
=
reinterpret_cast
<
const
QRgb
*>
(
image
.
scanLine
(
y
)
)
;
for
(
int
x
=
0
;
x
<
image
.
width
();
x
++
)
{
for
(
int
x
=
0
;
x
<
image
.
width
();
x
++
)
{
scanData
.
append
(
line
[
4
*
x
]);
scanData
.
append
(
qRed
(
line
[
x
])
)
;
scanData
.
append
(
line
[
4
*
x
+
1
]
);
scanData
.
append
(
qGreen
(
line
[
x
])
);
scanData
.
append
(
line
[
4
*
x
+
2
]
);
scanData
.
append
(
qBlue
(
line
[
x
])
);
}
}
}
}
break
;
break
;
...
...
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