Source language: Translate to:

Graphic on top of video

General questions about NeoBook

Moderator: Neosoft Support

Graphic on top of video

Postby ajhunt » Sun May 29, 2016 5:59 am

Hi All, is there any way to display a transparent image on top of a playing video? At present I can display a video no problem, but when trying to put a transparent logo on top, it displays the whole rectangle with a solid background even though the image is a transparent .png and the image box is set to Hollow. Any suggestions appreciated. Many thanks.
ajhunt
 
Posts: 215
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom

Re: Graphic on top of video

Postby Garic » Tue May 31, 2016 9:38 am

What region contains your png? - completely transparent or translucent

Image
ks
.............
Image
User avatar
Garic
 
Posts: 107
Joined: Wed Sep 26, 2012 8:42 am

Re: Graphic on top of video

Postby ajhunt » Tue May 31, 2016 10:23 am

Hi Garic, I'm just wanting to display a transparant image on top of a playing video but the transparancy always displays as black. Even when using a .bmp and choosing a transpancy it shows the whole image without ignoring the transpancy.
ajhunt
 
Posts: 215
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom

Re: Graphic on top of video

Postby Garic » Tue May 31, 2016 10:49 am

Try this:
This example is suitable for bmp images
All white pixels(background(RGB: 255,255,255)) in bmp image will be transparent

Code: Select all
PushButton(Show) - Left Click:

CustomWindow "" "-10000" "-10000" "Container2" "NoBorder"
zmSetCustomWindowMask "D:\1.bmp" "Container2"   or   ksSetCustomWindowMask "Container2" "D:\1.bmp"
zmShowInRectangle "Container2" "MainWindow" "20" "40"


Image

Run Time:
Image
Last edited by Garic on Tue May 31, 2016 5:08 pm, edited 3 times in total.
ks
.............
Image
User avatar
Garic
 
Posts: 107
Joined: Wed Sep 26, 2012 8:42 am

Re: Graphic on top of video

Postby ajhunt » Tue May 31, 2016 12:03 pm

Hi again Garic, thanks for your help. Can I ask what plugin you are using to display the .bmp? What does "zmSetCustomWindowMask", "ksSetCustomWindowMask" and "zmShowInRectangle" belong to as not part of the normal NeoBook action commands. thankyou for your time and assistance Garic as really appreciated.
ajhunt
 
Posts: 215
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom

Re: Graphic on top of video

Postby Garic » Tue May 31, 2016 12:15 pm

standard commands neobook do it probably will not work.
actions "zmSetCustomWindowMask" and "zmShowInRectangle" are in the plugin zmFunctions

Russian version:
zmFunctions(Rus)

Ask the guys on the forum who have the English version of the plugin.
ks
.............
Image
User avatar
Garic
 
Posts: 107
Joined: Wed Sep 26, 2012 8:42 am

Re: Graphic on top of video

Postby ajhunt » Wed Jun 01, 2016 4:03 am

Hi Garic, many many thanks - I can work with that and over videos. Would be nice to be able to get the english version, any idea where can do that as the link says the file is deleted. I have got the russian version ok but the english would be great. Many many many thanks Garic, a life saver. Can anybody let me know where I can get the english version please. Thanks to all.
ajhunt
 
Posts: 215
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom

Re: Graphic on top of video

Postby ajhunt » Thu Jun 02, 2016 1:04 am

Hi again Garic, it works great with one tiny exception. The mask always leaves a couple of white pixels showing outside the .bmp image. Do you know if there is a way to make it a perfect mask? or even a way to make the action work with a black backing as showing a tiny black outline would be better than showing a tiny white outline. By the way I couldn't get "ksSetCustomWindowMask "Container2" "D:\1.bmp"" to work as didn't recognise "ksSetCustomWindowMask" - is this from another plugin? Thanks for all your help Garic, it is appreciated.
ajhunt
 
Posts: 215
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom

Re: Graphic on top of video

Postby Garic » Thu Jun 02, 2016 7:26 am

Hi ajhunt.

ajhunt wrote:it works great with one tiny exception. The mask always leaves a couple of white pixels showing outside the .bmp image. Do you know if there is a way to make it a perfect mask?

To make it all perfectly, without additional contour pixels, ragged edges and other artifacts, it is necessary to write a special plug-in with its built-in player that will be able to output (directly into video memory), a variety of graphic formats. But it requires a lot of knowledge and time.

ajhunt wrote: or even a way to make the action work with a black backing as showing a tiny black outline would be better than showing a tiny white outline.

This can be done, I will add to this plug-in feature that allows the user to set the color that will be completely transparent. You can use any substrate (the background) - not just black.
Image


ajhunt wrote: By the way I couldn't get "ksSetCustomWindowMask "Container2" "D:\1.bmp"" to work as didn't recognise "ksSetCustomWindowMask" - is this from another plugin?

Yes, it's another plug-in, just him and I added the possibility to select the transparent color.
Wait a little...
ks
.............
Image
User avatar
Garic
 
Posts: 107
Joined: Wed Sep 26, 2012 8:42 am

Re: Graphic on top of video

Postby ajhunt » Fri Jun 03, 2016 12:04 am

Hi Garic, that is FANTASTIC, can't wait to include it in my NeoBook Publication. Thank you so so much for all your help in this and thank you too for your great plug-in. Could you please let me know when and where I can download it from when available. Just found the website for kmFunctions so will go have a read. A massive thank you again Garic.
ajhunt
 
Posts: 215
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom

Re: Graphic on top of video

Postby Garic » Fri Jun 03, 2016 5:11 am

Hi ajhunt.

Here you can download your desired plugin: viewtopic.php?f=3&t=21664
With it, you can set the desired color of pixels in the mask that are transparent.
Now you can use the mask with any background such as black, green, red...

In your case use this code:
Code: Select all
CustomWindow "" "-10000" "-10000" "Container2" "NoBorder"
ksSetCustomWindowMask "Container2" "[PubDir]1.bmp" "0" "0" "255"
zmShowInRectangle "Container2" "MainWindow" "20" "40"

"0" "0" "255" -that is, if the background in your mask has a blue color.
ks
.............
Image
User avatar
Garic
 
Posts: 107
Joined: Wed Sep 26, 2012 8:42 am

Re: Graphic on top of video

Postby Garic » Fri Jun 03, 2016 10:26 am

You can also look at this interesting plugin, maybe you also useful.

viewtopic.php?f=3&t=19634
ks
.............
Image
User avatar
Garic
 
Posts: 107
Joined: Wed Sep 26, 2012 8:42 am

Re: Graphic on top of video

Postby ajhunt » Fri Jun 03, 2016 1:52 pm

Will do Garic, as you say may well be usefull in my publication. Thank you for all your help, you are a superstar.
ajhunt
 
Posts: 215
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 1 guest