Closed
Bug 322647
Opened 19 years ago
Closed 18 years ago
drawImage from canvas darkens image
Categories
(Core :: Graphics: Canvas2D, defect)
Core
Graphics: Canvas2D
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: bugzilla, Assigned: roc)
Details
Attachments
(1 file)
1.59 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 When using a canvas as the source for drawImage, the lightness seems to be very slighly decreased in the resulting image. This happens regardless whether the source is another canvas or the target itself. Doing clearRect on the target before drawing does not help. globalAlpha or globalCompositeOperation are not set. Reproducible: Always Steps to Reproduce: Fill a canvas with white, copy it to itself repeatedly using context.drawImage(canvas, 0, 0) (will attach testcase that does this) Actual Results: Canvas slowly fades to black Expected Results: Canvas remains white
Reporter | ||
Comment 1•19 years ago
|
||
Comment 2•19 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060111 Firefox/1.6a1 ID:2006011113 Confirmed
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•19 years ago
|
||
This also seems to be a problem in drawWindow(). On Linux, with a 16-bit depth display, drawWindow() doesn't produce color values that are perfectly correct. For example, white (255,255,255) pixels in the original window are rendered on the canvas as (248, 252, 248). Solid yellow becomes (248,252,0). Reassign to roc per irc conversation.
Assignee: nobody → roc
OS: Windows XP → All
Hardware: PC → All
Assignee | ||
Comment 4•19 years ago
|
||
I think the drawWindow issue is different. I'm not 100% sure what's going on here. Does a white image drawn to the canvas darken at all?
Reporter | ||
Comment 5•19 years ago
|
||
drawImage using a white HTMLImageElement as a source produces a perfect result, but drawImage using a HTMLCanvasElement that is painted with rgb(255, 255, 255) as the source produces rgb(254, 254, 254). (Thus when you wait until the counter says 255 in the test case, you'll have perfect black -- I hadn't noticed that before. Btw, the ColorZilla extension with its color picker is very useful for testing this)
Assignee | ||
Comment 6•19 years ago
|
||
Are you using a 16-bit or 24-bit display?
Comment 7•19 years ago
|
||
(In reply to comment #6) > Are you using a 16-bit or 24-bit display? Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.9a1) Gecko/20060107 SeaMonkey/1.5a I'm seeing this on a 16-bit-display, 800x600, SiS6326 graphics card 8MB
Assignee | ||
Comment 8•19 years ago
|
||
I want to know if this happens on a 24-bit display.
Comment 9•19 years ago
|
||
(In reply to comment #8) > I want to know if this happens on a 24-bit display. Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.9a1) Gecko/20060107 SeaMonkey/1.5a Now seeing this on a 24-bit-display, 800x600, SiS6326 graphics card 8MB
Comment 10•19 years ago
|
||
this bug happens with all, I use 32-bit Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060112 Firefox/1.6a1 ID:2006011212
Comment 11•19 years ago
|
||
The results with a globalAlpha of 0.5 or less are odd. http://m8y.org/tmp/drawimagetest.html
Reporter | ||
Comment 12•18 years ago
|
||
Appears to work fine in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1a3) Gecko/20060526 BonEcho/2.0a3 -- propose resolving it as FIXED if someone can confirm?
Comment 13•18 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060529 Minefield/3.0a1 ID:2006052910 [cairo] confirmed, testcase stays white since we don't know what fixed it -> WFM
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•