merbin2012 / sharex

Automatically exported from code.google.com/p/sharex
0 stars 1 forks source link

Screenshot Transparency Issue #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Take active window screenshot with shadow and transparency enabled
2. It's random
3. Transparency will *not* be enabled, and you'll get something like this: 
http://mpql.net/i/p/ss/2012-05-12_4nnZK.png
4. Open settings, disable transparency and shadow, close settings to save them, 
open settings, re-enable transparency and shadow
5. Take screenshot of the *same active window*, and it's fixed now for some 
reason.

What is the expected output? What do you see instead?
I expect transparency to always work.

What version of the product are you using? On what operating system?
dev version of ShareXmod, though it happened to me on ShareX as well, and 
mcored instructed me to write up an issue here. Windows 7 XP 64-bit.

Please provide any additional information below.
I have a modern computer ( http://mpql.net/i/p/ss/2012-05-12_qccIe.png ) with a 
decent video card (ATI Radeon HD 5670), so, it's not a lag issue on my end.

Original issue reported on code.google.com by mopqu...@gmail.com on 13 May 2012 at 1:17

GoogleCodeExporter commented 9 years ago
I can also replicate this on my machine with similar specs but on Vista X64.

I have only had this issue since the r80 release.

Original comment by Typhoon...@gmail.com on 17 May 2012 at 5:04

GoogleCodeExporter commented 9 years ago
I get this sometimes, it seems to only happen for some windows and not others. 
On ones that it happens with, it always happens and changing settings does not 
fix it.

Also, I get this error when it happens:
Transparent capture failed. Reason: Images not equal.

Here's a window it always happens with: 
http://matt-russell.com/images/sharex/2012/SS_06-04_08-41-12PM.png

Most other windows will work fine, for example: 
http://matt-russell.com/images/sharex/2012/SS_06-04_08-41-51PM.png

Original comment by ultradude25 on 4 Jun 2012 at 10:42

GoogleCodeExporter commented 9 years ago
It's interesting to note that when I first pulled of msconfig, I got the
white border: http://mpql.net/i/p/ss/2012-06-04_KgW0h.png . I tried
using windows + D, and then restored it and re-captured, and I got
proper transparency: http://mpql.net/i/p/ss/2012-06-04_SlYwv.png .

Original comment by mopqu...@gmail.com on 4 Jun 2012 at 11:19

GoogleCodeExporter commented 9 years ago
If you open one process as admin and if sharex is not running as admin then 
when you try to do active window capture for that process, this function 
failing "SetWindowPos" because require sharex to be admin too. So this type 
windows will fail everytime until you open sharex as admin too.

About images not equal problem first taking ss with white background later 
black and again white. Comparing first white with last white to check is 
something changed because if something change this transparency algorithm can't 
work and many transparent capture apps doing process freezing or something like 
that for capture such windows.

And another problem is timing, like if window in the back is not open in time 
or not render in time then again transparent capture failing. I removed many 
sleeps to make it faster so in slow computers this can be very reproduceable. 
I'm not sure how to make this ugly tricks to work everytime because there isn't 
clean transparent capture way in Windows.

So i'm aware it not everytime works but can't find solution too because very 
difficult to reproduce in my computer, so even if i find solution i can't know 
is it fixed.

I tried other transparent capture apps too and those apps not everytime works 
too or just they using long sleep (waiting) for make sure it works everytime i 
think.

Original comment by flexy...@gmail.com on 4 Jun 2012 at 12:26

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
My ShareX does run as administrator.

That aside, I recall this working without fail in ZScreen. Was something
done differently there?

Original comment by mopqu...@gmail.com on 4 Jun 2012 at 12:31

GoogleCodeExporter commented 9 years ago
It it thinking that the MSConfig window has changed because of that blue 
pulsing animation on the OK button?

Original comment by ultradude25 on 4 Jun 2012 at 12:35

GoogleCodeExporter commented 9 years ago
I know your problem not to do with administrator thing. It is timing issue 
probably.

http://code.google.com/p/zscreen/source/browse/trunk/ScreenCapture/Screenshot_Tr
ansparent.cs
http://code.google.com/p/sharex/source/browse/trunk/ScreenCapture/Screenshot_Tra
nsparent.cs

Exactly same.

Original comment by flexy...@gmail.com on 4 Jun 2012 at 12:37

GoogleCodeExporter commented 9 years ago
This issue is still present for me using the recommended download.

Original comment by mopqu...@gmail.com on 30 Sep 2012 at 12:24

GoogleCodeExporter commented 9 years ago
Still present. Will this issue ever be solved?

Original comment by dannyaim...@gmail.com on 28 Jan 2013 at 2:55

GoogleCodeExporter commented 9 years ago
I can't solve it. Main reason is i can't reproduce it. Very rarely it happening 
to me.

Original comment by flexy...@gmail.com on 28 Jan 2013 at 7:07

GoogleCodeExporter commented 9 years ago
Whether or not it happens seems to be random. I might suspect it's happening 
too fast for the capture sometimes, or something. Since reporting this issue, 
I've just disabled the shadows, and dealt with the little white corners.

Original comment by mopqu...@gmail.com on 28 Jan 2013 at 7:10

GoogleCodeExporter commented 9 years ago
Yea it is timing issue. Adding sleep will solve problems but i don't like that 
solution. Because that problem happening like 5% of captures for me and i would 
wait for sleep for no reason in 95% of captures. Also depending on computer 
speed that sleep time will require different times so it is not good solution.

Original comment by flexy...@gmail.com on 28 Jan 2013 at 7:13

GoogleCodeExporter commented 9 years ago
It's happening in 100% of captures for me, and as I mentioned before, my 
computer is quite fast. Rather than adding sleep, would it do to wait for 
confirmation of a shot made with a certain background before moving on to the 
next? Near as I can tell, it does black, then white, and it looks like both 
shots are coming up white. So, if you changed it to black, took a picture, and 
confirmed it was still black afterward, then turned it white, took a picture, 
confirmed again, and then averaged the alpha again that way, wouldn't it work?

Original comment by mopqu...@gmail.com on 28 Jan 2013 at 7:33

GoogleCodeExporter commented 9 years ago
Mainly problem is first one is not white because window not rendering quick 
enough behind actual window or not even resizing or position behind window fast 
enough this is why some peoples see white squares in their screenshots. And 
that white you see in result is 3. screenshot. It first takes white then black 
then white again to compared first ss for understand is screenshot changed 
because with animated graphics this algorithm can't work and if it failed then 
just returning 3. white ss. So problem is waiting window to show up and render 
before take first ss i think but i'm not sure and using shown even for wait not 
works.

Original comment by flexy...@gmail.com on 28 Jan 2013 at 7:40

GoogleCodeExporter commented 9 years ago
Maybe add a configurable sleep time for users, so they can set it to their own 
timings, and just default it to the ones that you currently have?

Original comment by mopqu...@gmail.com on 28 Jan 2013 at 8:18

GoogleCodeExporter commented 9 years ago
I tried to reproduce again but after 50+ tries it always worked so i'm giving 
up impossible to fix it for me. Because i can't find cause of this if i can't 
reproduce. And even if i find cause of it can't test is my fix worked. When it 
working without any sleep for me i can't know is adding sleep there can fix the 
problem for other peoples.

Original comment by flexy...@gmail.com on 31 Jan 2013 at 9:01

GoogleCodeExporter commented 9 years ago
Did you not see my suggestion in the last post? Even if you cannot produce the 
problem, a setting like that would enable users like myself, and the several 
other people experiencing this issue to test which sleep times work. As you 
suggested earlier, it may be machine dependent, so a configurable option would 
be the only solution that would allow us to fix our own problem.

Original comment by mopqu...@gmail.com on 31 Jan 2013 at 3:02

GoogleCodeExporter commented 9 years ago
because i'm not sure is sleep can solve it. it can be window ordering problem 
or something like that. also there is many places where i can add these sleeps 
im not sure which can solve problem because i don't know cause of it fully.

Original comment by flexy...@gmail.com on 31 Jan 2013 at 3:06

GoogleCodeExporter commented 9 years ago
Is there any testing I, or someone else experiencing the problem, could help 
you do in order to figure that out?

Original comment by mopqu...@gmail.com on 31 Jan 2013 at 3:07

GoogleCodeExporter commented 9 years ago
Why mark this Won'tFix?

I believe I can give you steady reproduction steps:

1. Grab http://processhacker.sourceforge.net/
2. Right click any process, and click "Properties"
3. Try to take a window screenshot of the main window or the child window. 
It'll have this issue 100% of times.

Original comment by DoubledH...@gmail.com on 7 Jun 2014 at 10:33

GoogleCodeExporter commented 9 years ago
This appears to occur 100% of the time in any application that has a dialog 
currently open.

ex: http://i.imgur.com/YYZTNuT.png

Original comment by DoubledH...@gmail.com on 7 Jun 2014 at 10:35

GoogleCodeExporter commented 9 years ago
Another really funny example http://i.imgur.com/kyXVKcJ.png

Original comment by DoubledH...@gmail.com on 7 Jun 2014 at 10:44

GoogleCodeExporter commented 9 years ago
https://github.com/ShareX/ShareX/issues/167

Original comment by flexy...@gmail.com on 7 Jun 2014 at 11:14