WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
22186
[QT] lacks putImageData support in Canvas
https://bugs.webkit.org/show_bug.cgi?id=22186
Summary
[QT] lacks putImageData support in Canvas
Dirk Schulze
Reported
2008-11-11 13:54:09 PST
QtWebKit lacks getImageDatat / putImageData support for Canvas.
Attachments
getImageData support
(2.83 KB, patch)
2008-11-11 14:02 PST
,
Dirk Schulze
no flags
Details
Formatted Diff
Diff
getImageData support
(3.22 KB, patch)
2009-02-03 06:18 PST
,
Dirk Schulze
no flags
Details
Formatted Diff
Diff
getImageData support
(3.06 KB, patch)
2009-02-03 12:56 PST
,
Dirk Schulze
sam
: review+
Details
Formatted Diff
Diff
follow up of getImageData
(1.49 KB, patch)
2009-02-03 15:48 PST
,
Dirk Schulze
sam
: review+
Details
Formatted Diff
Diff
putImageData support for Qt
(3.50 KB, patch)
2009-03-01 00:42 PST
,
Dirk Schulze
no flags
Details
Formatted Diff
Diff
putImageData support for Qt
(3.30 KB, patch)
2009-03-02 04:37 PST
,
Dirk Schulze
no flags
Details
Formatted Diff
Diff
putImageData support for Qt
(3.77 KB, patch)
2009-03-02 05:56 PST
,
Dirk Schulze
zecke
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Dirk Schulze
Comment 1
2008-11-11 14:02:31 PST
Created
attachment 25053
[details]
getImageData support This adds getImageData-support to Qt. It fails when the alpha is lower than 255. Don't know if it is a problem of the calculation, this bug:
https://bugs.webkit.org/show_bug.cgi?id=20079
or if the alpha-value is allways 255 from translating a QPixmap to a QImage.
Dirk Schulze
Comment 2
2009-02-03 06:18:58 PST
Created
attachment 27277
[details]
getImageData support add getImageData support for qt.
Dirk Schulze
Comment 3
2009-02-03 12:56:05 PST
Created
attachment 27284
[details]
getImageData support use qt to convert to QImage::Format_ARGB32 instead of premultiplied colors. Added a check, if the default qimage format (premultiplied colors) changes.
Sam Weinig
Comment 4
2009-02-03 13:04:10 PST
Comment on
attachment 27284
[details]
getImageData support r=oliver+sam
Dirk Schulze
Comment 5
2009-02-03 13:28:58 PST
landed getImageData support in
r40546
.
Dirk Schulze
Comment 6
2009-02-03 15:48:59 PST
Created
attachment 27295
[details]
follow up of getImageData follow up of the getImageData patch above. To call toImage once speeds up getImageData.
Dirk Schulze
Comment 7
2009-02-04 01:11:29 PST
landed follow up in
r40559
Pam Greene (IRC:pamg)
Comment 8
2009-02-12 10:59:51 PST
Bug gardening: landed, so fixed.
Dirk Schulze
Comment 9
2009-02-12 11:41:54 PST
(In reply to
comment #8
)
> Bug gardening: landed, so fixed.
No. Just getImageData was landed. putImageData is missing. I'll upload a patch soon and rename the summary
Dirk Schulze
Comment 10
2009-03-01 00:42:14 PST
Created
attachment 28135
[details]
putImageData support for Qt putImageData support. I'm not sure if I have to premultiply the Image before I copy the image to the pixmap. I do it for now.
Dirk Schulze
Comment 11
2009-03-02 04:37:59 PST
Created
attachment 28167
[details]
putImageData support for Qt make putImageData a bit faster.
Dirk Schulze
Comment 12
2009-03-02 05:56:46 PST
Created
attachment 28168
[details]
putImageData support for Qt more speed-up.
Holger Freyther
Comment 13
2009-03-02 06:09:42 PST
Comment on
attachment 28168
[details]
putImageData support for Qt
> + [QT] lacks putImageData support in Canvas
Qt please.
> + unsigned char* srcRows = source->data()->data()->data() + originy * srcBytesPerRow + originx * 4; > + for (int y = 0; y < numRows; ++y) { > + quint32* scanLine = reinterpret_cast<quint32*>(image.scanLine(y + desty)); > + for (int x = 0; x < numColumns; x++) { > + int basex = x * 4; > + > + scanLine[x + destx] = reinterpret_cast<quint32*>(srcRows + basex)[0]; > + } > + srcRows += srcBytesPerRow; > + } > + m_data.m_pixmap = QPixmap::fromImage(image);
weird spacing here... extra line in the for/for... but not at the end of the loops..
> + if (isPainting) > + m_data.m_painter->begin(&m_data.m_pixmap); > }
and the naming is really weird here..: endy,endx vs. endY, endX srcRows vs. srcRow.. but all this is coming from the CG variant so I will put it back my complains... just change the spacing and QT... thanks for removing the last notImplemented from there.
Dirk Schulze
Comment 14
2009-03-02 12:32:23 PST
landed in 41355.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug