[haiku-bugs] [Haiku] #10491: Alpha channel not initialized before copy to clipboard

  • From: "humdinger" <trac@xxxxxxxxxxxx>
  • Date: Thu, 30 Jan 2014 11:32:48 -0000

#10491: Alpha channel not initialized before copy to clipboard
-------------------------------------+------------------------------
 Reporter:  humdinger                |        Owner:  nobody
     Type:  bug                      |       Status:  new
 Priority:  normal                   |    Milestone:  R1
Component:  Applications/Screenshot  |      Version:  R1/Development
 Keywords:                           |   Blocked By:
 Blocking:                           |  Has a Patch:  0
 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:

 [[Image(gmail.png)]]

 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.)

--
Ticket URL: <https://dev.haiku-os.org/ticket/10491>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: