PDA

View Full Version : Unintentional png transparency in LiveText?



MagicShoebox
11-14-2013, 05:54 PM
I am experiencing a strange bug in LiveText (I was originally using 2.1, but I just updated to 2.52 and am still seeing it) where an opaque image is being rendered transparently.

These are .pngs, all transparency-enabled, but with differing amounts. One is a small bar at the bottom with most of the screen fully transparent, another fully covers the entire screen.

The strange thing is that even the opaque areas of the picture are being rendered transparently by LiveText. When I send the page to the TriCaster, I can see the video beneath the "opaque" areas of the overlay. I even tried creating a solid black rectangle in the page, put it behind the opaque parts of the overlay, and all of a sudden, the transparency stopped. So I know it isn't the TriCaster rendering it improperly, it's LiveText.

I have checked the .cg Project files and confirmed the layers are at Alpha 255, and I have checked the .PNGs and confirmed they are fully opaque as well.

Has anyone else experienced anything like this?

I will provide sample screen shots / rendered images / sample .pngs if requested.

Thanks!

SBowie
11-14-2013, 06:09 PM
Hmmm. You've checked to make sure that LiveMatte isn't turned on for TriCaster's Net input, I suppose?

MagicShoebox
11-18-2013, 05:53 PM
Hmmm. You've checked to make sure that LiveMatte isn't turned on for TriCaster's Net input, I suppose?Thanks for the reply!

Yes, LiveMatte was turned off.

I just took a few minutes to easily replicate this bug using only LiveText to eliminate all the variables. I also used a simple C# program to test the actual pixel values and confirm what was going on.

I have a 300kb .zip with the related materials. If you would like it, simply PM me where to e-mail it.

Steps to reproduce:
1) Start a new project
2) Add a 1920x1080 transparency-enabled .png to the project
(Optional) 3) Save, edit, and reload the .cg project file, changing the offset of the image to 0,0 for easier pixel comparison
4) Export the current page as a .png

An analysis of the exported .png in comparison to the original .png will show that:
-Every pixel has had its alpha value reduced from 255 to 253
-Every pixel has had its R, G, and B values reduced by 1.
-The right-most column (x = 1920) has had its alpha value reduced to 0, and its R, G, and B values reduced somewhere from 3-5.

EDIT: Actually the right-most column (x = 1920) has been blanked, (0,0,0,0). I simply failed to realize 3-5 were the values from the original file. Additionally, on a different image, some of the pixels were reduced by RGB 1, others by RGB 2. Alpha reduction remained at 2.

SBowie
11-18-2013, 06:25 PM
Are you importing a premultiplied png, or non-premuliplied?

MagicShoebox
11-18-2013, 06:36 PM
Non-premultiplied.

However, I must correct myself. I thought the images were 32bppArgb, and I just discovered it's actually 24bppRgb, with no starting alpha layer. Let me check another one of the .pngs exhibiting the bug and see what format it is.

Either way, LiveText still shouldn't be adding transparency to an opaque image, alpha layer or no.

MagicShoebox
11-18-2013, 07:13 PM
Okay, one last post because I had an error in my C# so my analysis was off.

In both a 24-bit (no alpha channel, not-premultiplied) and a 32-bit (alpha channel, not-premultiplied) .png, the bottom (y=1079) and right-most (x=1919) lines are blanked (0,0,0,0).

In the 24-bit image, every pixel has had its alpha value reduced by 2.
In the 32-bit image, every pixel has had its alpha value reduced by 1 or 2.

The exported, 32-bit images by LiveText claim to be non-premultiplied, but their RGB values have been reduced compared to the original image (in most cases, it's only by 1 or 2, but in some cases it was as much as 80.)

SBowie
11-18-2013, 07:40 PM
I performed a quick similar test (I have some tools I built for this sort of thing years ago on hand). I can confirm that, starting from a fully opaque 32bit image, after loading into LT 2.x and exporting to a PNG, alpha was decreased to 253 across the entire image. (I observed no other changes, apart from a 1 pixel offset to the left and up that may well have been my own my own positioning error, resulting in a fully transparent 1 pixel margin on the two affected sides).

This does seem odd, and I'll inquire about it - but I doubt such a small alpha deviation accounts for a problem of the magnitude you seem to be encountering. I'll take another look at this in the morning.

MagicShoebox
11-18-2013, 07:57 PM
I performed a quick similar test (I have some tools I built for this sort of thing years ago on hand). I can confirm that, starting from a fully opaque 32bit image, after loading into LT 2.x and exporting to a PNG, alpha was decreased to 253 across the entire image. (I observed no other changes, apart from a 1 pixel offset to the left and up that may well have been my own my own positioning error, resulting in a fully transparent 1 pixel margin on the two affected sides).

This does seem odd, and I'll inquire about it - but I doubt such a small alpha deviation accounts for a problem of the magnitude you seem to be encountering. I'll take another look at this in the morning.Great! Glad you're seeing it, too.

2 alpha doesn't sound like much to me either, but the problem is basically only visible when there's motion. You don't notice it if the background is static, but when we put the graphic up over a person, and the person moves, it becomes very distracting. I'm afraid I don't have the tools to test putting a video behind the exported image to see if that looks similar to what I'm experiencing on the TriCaster. (And thus implying that the 2 alpha is enough to explain everything).

I doubt the positioning is an error on your part. LiveText has a hell of a time getting things positioned correctly. That's why I resorted to editing the .cg files by hand to adjust things.

Case in point:
offset 0 0 - Edited .cg to match the original .png, pixel locations match, but seems to crop bottom & right lines.
offset 1.29041 -1.29028 - What you get if you simply "drop" the .png onto the canvas
offset -1.93540 -4.51609 - What you get if you click the "center vertical" and "center horizontal" buttons

VideoEng QA
12-02-2013, 01:31 PM
Thank you for the bug report. We did find the transparency issue you spoke of as well as the 1-pixel wide column and row crop issue which you noticed and have fixed both of these in a beta patch - LiveText 2.54. We've not yet released this patch, but if you're an owner of LiveText 2 and are interested in getting it right away, send an email HERE ([email protected]) and we will get you the build.

Thanks!
Jeremy Brosius

MagicShoebox
12-03-2013, 08:09 AM
Thank you for the bug report. We did find the transparency issue you spoke of as well as the 1-pixel wide column and row crop issue which you noticed and have fixed both of these in a beta patch - LiveText 2.54. We've not yet released this patch, but if you're an owner of LiveText 2 and are interested in getting it right away, send an email HERE ([email protected]) and we will get you the build.

Thanks!
Jeremy BrosiusYou guys are great, thanks!

I fired it up last night and a quick test showed it was working. I'll put it through the proper paces as soon as I get a chance.

The installer did pop up with a weird message I didn't see the previous times I updated LiveText, though? It said it couldn't copy a file, "iw7pd.dll" or something like that. It gave me the classic Abort/Retry/Ignore and I tried Ignore. I haven't noticed anything wrong with the install yet, but you might want to try running the installer and seeing if it pops up.

VideoEng QA
12-03-2013, 10:10 AM
That's interesting - I'd like to see what we can do, but we haven't seen that same message here.
What operating system you are running, and is your Windows user account a member of administrators?

Jeremy Brosius

MagicShoebox
12-04-2013, 10:07 PM
That's interesting - I'd like to see what we can do, but we haven't seen that same message here.
What operating system you are running, and is your Windows user account a member of administrators?

Jeremy BrosiusI just installed the update on another machine with zero problems, so I think it was just a fluke. (Maybe I still had a process running or a file was in use somewhere.)

Also had a chance to run it through the paces and it works great!

kanep
12-20-2013, 01:44 PM
New version of LiveText was just released with these fixes.

http://new.tk/dl