Opened 7 years ago

Closed 7 years ago

#10491 closed bug (fixed)

Alpha channel not initialized before copy to clipboard

Reported by: humdinger Owned by: axeld
Priority: normal Milestone: R1
Component: Applications/Screenshot Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


This is hrev46754.

If I take a screenshot of Web+ showing e.g. the GMail web interface, the Screenshot app's preview shows everything alright. When I save it as PNG, the resulting image is also alright. But if I copy the screenshot to the clipboard instead, and paste it into WonderBrush, I get these transparent areas:

alpha-channel issues

Here is stippi's quick analysis in IRC (30.01.2014):

[11:25] <stippi> It should make sure to init the alpha channel when it saves window contents. [11:26] <stippi> Because from app_server, you get B_RGB32, not B_RGBA32, if memory serves. It means the alpha channel could contain random garbage and should be ignored. [11:27] <stippi> It does look a bit like there is an integer overflow somewhere in the drawing code. [11:27] <stippi> Whcih would be another bug. [11:27] <stippi> One that doesn't have much of any effect, though.

(Note: I don't know if it's relevant, but stippi said "init the alpha channel when it saves window contents". As I said, saving as file does work, only copying to the clipborad results in the described issue.)

Attachments (1)

gmail.png (28.3 KB ) - added by humdinger 7 years ago.
alpha-channel issues

Download all attachments as: .zip

Change History (5)

by humdinger, 7 years ago

Attachment: gmail.png added

alpha-channel issues

comment:1 by humdinger, 7 years ago

I'd be curious, though, why it only happens when screenshooting Web+...

comment:2 by axeld, 7 years ago

It probably fills its bitmaps completely (and leaves out the alpha channel), whereas the app_server clears newly allocated bitmaps.

comment:3 by axeld, 7 years ago

Owner: changed from nobody to axeld
Status: newin-progress

comment:4 by axeld, 7 years ago

Resolution: fixed
Status: in-progressclosed

Fixed in hrev46795.

Note: See TracTickets for help on using tickets.