YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

New Topic Post Reply
Color damaging (in HQ)
gman Offline
#1 Posted : Friday, February 25, 2011 8:36:17 AM(UTC)

Rank: Neuling

Joined: 2/25/2011(UTC)
Posts: 5
Points: 15
Location: Russia
Hello!

I've encountered color damaging problem: when i take the screenshot that preserves alpha transparency, it appears that this screenshot looks different when placed on the white background than the same windows itself.

Compare the window on the white background (and what I actually see on the monitor) and the screenshot on the white background. The screenshot itself is here.

And for reference only (I know, glass is more than just transparency and such effects can't be achieved using PNG) the window on top of transparency pattern.

I'm the programmer myself so you can ask me to do whatever you need to locate this issue.

P. S. I've also found out that other software also damages color on the same way. Is it a feature?
TommyB Offline
#2 Posted : Friday, February 25, 2011 8:43:40 AM(UTC)


Rank: Administratoren

Joined: 7/12/2008(UTC)
Posts: 464
Points: 1.295
Location: Wilhemshaven, Germany
Hi,

Generally saying: Each bug is a feature ;)

Well, I haven't noticed this before. Maybe because I use an almost not transparent aero glass color.
Also (at the moment) I don't know what went wrong with my calculation which seems to cause the error.

But I will have a look at it. Maybe I can fix this :)

Thanks for reporting and the examples :)
Thomas Baumann
BattCursor.Net - Developer
Shotty.Devs-On.Net - Developer
Devs-On.Net - Administrator
Microsoft Certified Systems Administrator (MCSA)

When I post FP:TommyB in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting
gman Offline
#3 Posted : Friday, February 25, 2011 9:15:09 AM(UTC)

Rank: Neuling

Joined: 2/25/2011(UTC)
Posts: 5
Points: 15
Location: Russia
Thank you for the reply)

You can also need my aero settings.

And I've noticed another problem. It seems from the comparison that window is captured in an inactive state with and active-state shadow. Here is the picture =)

(just an addition, not hurrying you up or something)
gman Offline
#4 Posted : Sunday, February 27, 2011 12:31:09 PM(UTC)

Rank: Neuling

Joined: 2/25/2011(UTC)
Posts: 5
Points: 15
Location: Russia
Oh. In my attempt to investigate things I discovered the issue and found the way to "fix" it (although it's really more of a feature than a bug).

First of all, all screens from the program perfectly match the window itself, when it's displayed above black background. And colors are being extracted also from "black" screenshot. But colors in Aero become pale while displayed above dark backgrounds.

So I've inverted colors on both screenshots and swapped them as if black one was white. It produced great tasty colors (because they've been taken from white screenshot), but the transparency channel was left from the original "black" image. There were holes int the form when it was pure black on the black screenshot. And I added the third screenshot: above the "rgb(128, 128, 128)". Ran the same algorythm as if it was black, extracted alpha channel. And used this alpha values divided by 1.25 for the transparency of the form (the shadow used alpha channel extracted from the white-black comparison).

So, at the end i got this pictures (it's transparent png's, you can test them on various backgrounds):
Ordinary windows form (Screenshot by Shotty)
Microsoft Word (Screenshot by Shotty)
And tested it on the more intensive aero color (standard blue):
Ordinary windows form (Screenshot by Shotty)
As you can see, colors are slightly different and first picture looks better)

Also, that pngs now math window when placed on white, not black.

(I can also send you source, if you're interested.)
TommyB Offline
#5 Posted : Sunday, February 27, 2011 2:48:06 PM(UTC)


Rank: Administratoren

Joined: 7/12/2008(UTC)
Posts: 464
Points: 1.295
Location: Wilhemshaven, Germany
Sounds very interesting.

In fact, I use the color difference for the alpha channel calculation, but I use the color values from the black screenshot.

At the moment I work on another small project to compress compact disc images, including optimizions like ECM does, but if this works I have a deeper look into that.

What programming language do you use?
Thomas Baumann
BattCursor.Net - Developer
Shotty.Devs-On.Net - Developer
Devs-On.Net - Administrator
Microsoft Certified Systems Administrator (MCSA)

When I post FP:TommyB in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting
gman Offline
#6 Posted : Saturday, March 12, 2011 5:02:17 PM(UTC)

Rank: Neuling

Joined: 2/25/2011(UTC)
Posts: 5
Points: 15
Location: Russia
Sorry, I was overloaded with work, and couldn't reply fast.

I'm C# coder) Err... In fact, I was too lazy to write everything from scratch when I wanted to play around with algorithm, so I decompiled Shotty and modified CaptureWindowHQ method.

I can email you the code of that method (with comments) or send it in any other non-public way. (I've also added popup menu capture and multi-monitor support, so it's now 650 lines :\ But see the result.)

P. S. As a programmer, I understand that it's your code and I will never distribute it to anyone or use it anywhere. (I'm developing bug tracking and document management software, so it's unlikely that I'll ever need any part of your code.)
TommyB Offline
#7 Posted : Saturday, March 12, 2011 5:43:31 PM(UTC)


Rank: Administratoren

Joined: 7/12/2008(UTC)
Posts: 464
Points: 1.295
Location: Wilhemshaven, Germany
No problem, I don't have as much time as I want to have, too :)

Your changes sounds great, no matter that you have decompiled Shotty for this. I have nothing to hide, so I have chosen to not obfuscate my applications.

I'm a bit confused, because my CaptureWindowHQ should support multi-monitor systems, too. I have tested this several times on my machine.


It would be great if you want to send me an email with your changes. My email address is located at Shotty's Help and Support page.


Many thanks :)
Thomas Baumann
BattCursor.Net - Developer
Shotty.Devs-On.Net - Developer
Devs-On.Net - Administrator
Microsoft Certified Systems Administrator (MCSA)

When I post FP:TommyB in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting
gman Offline
#8 Posted : Saturday, March 12, 2011 7:16:25 PM(UTC)

Rank: Neuling

Joined: 2/25/2011(UTC)
Posts: 5
Points: 15
Location: Russia
Okay, I've sent it.

Yeah, I must clear up that I didn't test Shotty on multiple monitors before modifications, it just looked wrong to me, so yeah, I think I just misunderstood that part of code.

If you'll want further comments on my code, you're welcome)
Quick Reply Show Quick Reply
Users browsing this topic
Guest
New Topic Post Reply
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You can create polls in this forum.
You can vote in polls in this forum.

TommyB's Skin (Based upon Clean Slate theme by Jaben Cargman (Tiny Gecko))
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0,379 seconds.