Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
41d0ef0f
Commit
41d0ef0f
authored
Nov 30, 2020
by
Christoffer Ackelman
Committed by
Esteban Blanc
Dec 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QT: Fixed the image_pixel_iter image postprocessing function.
parent
dd794844
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
xtt/lib/glow/qt/glow_draw_qt.cqt
xtt/lib/glow/qt/glow_draw_qt.cqt
+12
-18
No files found.
xtt/lib/glow/qt/glow_draw_qt.cqt
View file @
41d0ef0f
...
...
@@ -2328,36 +2328,30 @@ void GlowDrawQt::image_pixel_iter(glow_tImImage orig_image,
glow_tImImage* image, void (*pixel_cb)(void*, unsigned char*),
void* userdata)
{
unsigned char *rgb, *rgb_row;
int rgb_height;
int rgb_width;
int rowstride;
QImage img;
if (orig_image) {
if (image && *image != orig_image) {
delete ((QImage*)*image);
}
*((QImage*)*image) = ((QImage*)orig_image)->copy(
);
img = ((QImage*)orig_image)->convertToFormat(QImage::Format_ARGB32
);
} else if (!*image) {
return;
} else {
img = ((QImage*)*image)->convertToFormat(QImage::Format_ARGB32);
}
rgb = ((QImage*)*image)->convertToFormat(QImage::Format_ARGB32).bits();
rgb_height = ((QImage*)*image)->height();
rgb_width = ((QImage*)*image)->width();
rowstride = ((QImage*)*image)->bytesPerLine();
rgb_row = rgb;
for (int j = 0; j < rgb_height; j++) {
rgb = rgb_row;
for (int i = 0; i < rgb_width; i++) {
if (*(rgb + 3)) {
(pixel_cb)(userdata, rgb);
unsigned char* rgb_row = img.bits();
for (int j = 0; j < img.height(); j++) {
unsigned char* rgb = rgb_row;
for (int i = 0; i < img.width(); i++) {
if (*(rgb)) {
(pixel_cb)(userdata, rgb+1);
}
rgb += 4;
}
rgb_row +=
rowstride
;
rgb_row +=
img.bytesPerLine()
;
}
*image = new QImage(img);
}
int GlowDrawQt::gradient_create_pattern(int x, int y, int w, int h,
...
...
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