Announcement: Our new CyberLink Feedback Forum has arrived! Please transfer to our new forum to provide your feedback or to start a new discussion. The content on this CyberLink Community forum is now read only, but will continue to be available as a user resource. Thanks!
CyberLink Community Forum
where the experts meet
| Advanced Search >
Add custom PiP masks
CharlesF
Member Location: Everett, Washington. U.S.A. Joined: Apr 16, 2009 20:49 Messages: 57 Offline
[Post New]
Is it possible to create and use a custom mask in the PiP designer for PD7?

I need widescreen 16:9 masks, not 4:3.
vn800rider
Senior Contributor Location: Darwen, UK Joined: May 15, 2008 04:32 Messages: 1949 Offline
[Post New]
Hi CharlesF,

I think this is still the position. Someone will point out if I'm wrong.

http://forum.cyberlink.com/forum/posts/list/3264.page

Cheers
Adrian Life is really simple, but we insist on making it complicated. (see below)
Confucius
AMD Phenom IIX6 1055T, win10, 5 internal drives, 7 usb drives, struggling power supply.
CharlesF
Member Location: Everett, Washington. U.S.A. Joined: Apr 16, 2009 20:49 Messages: 57 Offline
[Post New]
So the answer is "no."

Unfortunate and very disapointing.

:::Sigh:::

If someone would give me the specifications for the .msk files I might be compelled to build a GUI for editing them.

I'm assuming the PNG files are only used to give the user an idea of what the mask looks like.

Wouldn't it be cool if they used a PNG alpha channel to designate the mask area? Nah, that would be too easy on the end user. We don't want that.
CharlesF
Member Location: Everett, Washington. U.S.A. Joined: Apr 16, 2009 20:49 Messages: 57 Offline
[Post New]
I beleive I've figured out the .msk file specs. Fairly simple actually.

The header bytes in the .msk file (first 8 bytes) signify the resolution of the mask.

The first 4 bytes (D0 02 00 00) signify the X axis (720)

The next 4 bytes (1C 02 00 00) signify the Y axis (540)

This is a 4:3 aspect ratio.

Starting at the 9th byte, the next 720 bytes represent each pixel on the first row of pixels.

Each byte has a value of either 00 (0 decimal) also known as false, or FF (-1 decimal) also known as true. In computer terms, it is likely that any non-zero number is "true." I'm not sure if there are "shades" of alpha or not. There might be. Further testing would be required to determine if that is the case or not.

These 720 bytes that make up one row are repeated 540 times, one for each row of pixels (Y axis).

So taking this information in account, I am making an educated guess that if we change the resolution in the first 8 bytes of the file to 864 x 486 (16:9) and then follow those 8 bytes by 864 bytes for each 486 rows we can build our masks in 16:9 format.

I'm going to do further testing. I'll report back my findings. But don't hold your breath.


This message was edited 1 time. Last update was at Apr 30. 2009 13:15

[Post New]
OMG Charles - how can I hold my breath? You've taken it away completely!!!

I can't believe you've just said EXACTLY what I was going to say. Just amazing

Tony Tread gently and you'll hear the daisies grow...
CharlesF
Member Location: Everett, Washington. U.S.A. Joined: Apr 16, 2009 20:49 Messages: 57 Offline
[Post New]
Confirmed.

I was able to build a 16:9 ratio mask that masks out the entire left half.

If you have a hex editor you can make your own file too.

The first 8 bytes, as I said in the previous post, represent the resolution of the mask. You need a resolution that is divisible by 16 (hexidecimal) that's why I went with 864 x 486.

So to use 864 x 486, your first 8 bytes (in hexidecimal) need to be 60 03 00 00 (a 4-byte integer equalling 864 decimal) followed by E6 01 00 00 (a 4-byte integer equalling 486 decimal)

Attached is a zip file containing the mask and png image that I created. Hopefully people will be able to download it. If not, I'll post it on my website and provide a link.
 Filename
43-righthalf_16x9.zip
[Disk]
 Description
 Filesize
3 Kbytes
 Downloaded:
455 time(s)

This message was edited 1 time. Last update was at Apr 30. 2009 04:51

CharlesF
Member Location: Everett, Washington. U.S.A. Joined: Apr 16, 2009 20:49 Messages: 57 Offline
[Post New]
Quote: OMG Charles - how can I hold my breath? You've taken it away completely!!!

I can't believe you've just said EXACTLY what I was going to say. Just amazing

Tony


I'm such a geek. It was a puzzle that I had to solve. I'm that way. I solve problems. I can't help it.

I've been programming computers since I was 8 years old (33 years ago) so that experience helped. I know that most developers write binary files pretty much the same way. It wasn't hard to figure it out.

Say, Tony, do you know if the mask values are gradients? I mean if I enter 3F instead of FF will it be a partial mask (semi-transparent)?

I suppose I'll probably figure that out before you have a chance to post a reply. But I may as well ask. hehe

I'll likely develop a windows program that will provide a GUI for editing these mask files. That is, if enough interest is shown and maybe a promise of a donations or two upon completion.

Dafydd B [Avatar]
Senior Contributor Joined: Aug 26, 2006 08:20 Messages: 11973 Offline
[Post New]
Charles,
Please attach your file again - it's not there. (must be less than 100kb).

I have been following your post - and would like to look at what you came up with. Heck it's really good.

The masks are not gradient in PD7. Would be cool to have a few.

Dafydd

This message was edited 1 time. Last update was at Apr 30. 2009 05:22

[Post New]
Charles - I dips me lid to ya! (which is antiquated Australian vernacular, none of which is divisible by 16, for raising one's hat - showing respect)

Dafydd - the mask was there when I downloaded it. Not sure what happened at your end.

Not only was the mask there, but Charles' instruction (ReadMe) was correct. It is available as a 16:9 mask in PD7.


Cheers -

Tony
Tread gently and you'll hear the daisies grow...
CharlesF
Member Location: Everett, Washington. U.S.A. Joined: Apr 16, 2009 20:49 Messages: 57 Offline
[Post New]
Quote: Charles,
Please attach your file again - it's not there. (must be less than 100kb).

I have been following your post - and would like to look at what you came up with. Heck it's really good.

The masks are not gradient in PD7. Would be cool to have a few.

Dafydd


It was there before. I wonder if a moderator removed it?

I'll attach again and give you a link to download it.

http://www.charlesforsyth.com/downloads/43-righthalf_16x9.zip




 Filename
43-righthalf_16x9.zip
[Disk]
 Description
Widescreen half PiP mask
 Filesize
3 Kbytes
 Downloaded:
481 time(s)
CharlesF
Member Location: Everett, Washington. U.S.A. Joined: Apr 16, 2009 20:49 Messages: 57 Offline
[Post New]
Here's a left-half 16x9 mask.

http://www.charlesforsyth.com/downloads/44-lefthalf_16x9.zip


 Filename
44-lefthalf_16x9.zip
[Disk]
 Description
16x9 left-half mask
 Filesize
3 Kbytes
 Downloaded:
537 time(s)
Dafydd B [Avatar]
Senior Contributor Joined: Aug 26, 2006 08:20 Messages: 11973 Offline
[Post New]
Charles,

I am the Moderator!

No, I didn't move it... just in case you wondered.

Dafydd
[Moderator]

CharlesF
Member Location: Everett, Washington. U.S.A. Joined: Apr 16, 2009 20:49 Messages: 57 Offline
[Post New]
Quote: Charles,

I am the Moderator!

No, I didn't move it... just in case you wondered.

Dafydd
[Moderator]



I'll assume it was just a bug in the forum software then.

Cheers!

-Charles

This message was edited 1 time. Last update was at Apr 30. 2009 11:58

vn800rider
Senior Contributor Location: Darwen, UK Joined: May 15, 2008 04:32 Messages: 1949 Offline
[Post New]
The only answer is that Tony stole it. Life is really simple, but we insist on making it complicated. (see below)
Confucius
AMD Phenom IIX6 1055T, win10, 5 internal drives, 7 usb drives, struggling power supply.
[Post New]
Sssssssssssshhhhh Adrian - don't let on!

When I just went to download the left mask (to go with the other one I stole), I got this...

"The requested file could not be found. It probably was deleted. Click here to go back to the topic."

There's something whacko going on in CyberLand.

Cheers -

Tony
Tread gently and you'll hear the daisies grow...
James W
Senior Contributor Location: Lakeland, FL USA Joined: Aug 18, 2008 10:36 Messages: 911 Offline
[Post New]
If an average user can figure this out why can't Cyberlink provide a useful method of making custom masks? It would be a very useful feature and something I would actually use. A link could be put on Directors Zone for uploaded custom masks from users. Q9300 2.5 GHz
4 GB Ram
Nvidia 9800 GT
James W
Senior Contributor Location: Lakeland, FL USA Joined: Aug 18, 2008 10:36 Messages: 911 Offline
[Post New]
If an average user can figure this out why can't Cyberlink provide a useful method of making custom masks? It would be a very useful feature and something I would actually use. A link could be put on Directors Zone for uploaded custom masks from users. Q9300 2.5 GHz
4 GB Ram
Nvidia 9800 GT
CharlesF
Member Location: Everett, Washington. U.S.A. Joined: Apr 16, 2009 20:49 Messages: 57 Offline
[Post New]
Today I have been working on a utility that will convert a bitmap (.bmp) image into a PD7 mask data file (.msk). It just converts all white pixels into the transparent areas of the mask. Anything non-white is translated into the mask part in the resulting .msk file.

I am now writing documentation for it in the form of a readme file. I should have it up here within a few hours (after initial testing).

I consider this a beta version but I probably won't be able to provide support for it. I may not even upgrade it. It depends on interest, feedback and donations.

I designed it for myself really, to make it much easier to create .msk files. However, I am making it available for FREE to the public. Because I'm such a nice guy. hehe

Note though that it is designed for more advanced computer users.

As soon as it's ready I'll post a link to the download.


-Charles
CharlesF
Member Location: Everett, Washington. U.S.A. Joined: Apr 16, 2009 20:49 Messages: 57 Offline
[Post New]
Quote: If an average user can figure this out why can't Cyberlink provide a useful method of making custom masks? It would be a very useful feature and something I would actually use. A link could be put on Directors Zone for uploaded custom masks from users.


With over 30 years experience programming computers, i wouldn't call myself "an average user." hehe

Patience grasshopper... a new tool cometh!
CharlesF
Member Location: Everett, Washington. U.S.A. Joined: Apr 16, 2009 20:49 Messages: 57 Offline
[Post New]
Ok, the BMP to MSK Converter Utility v1.0 (beta) is done!

It only took about 10 hours! hehe

Here's a link to where you can download it:


http://www.charlesforsyth.com/downloads/BMPtoMSKConverter.ZIP (598K)

Please remember that I can't provide much support for this and it was designed for intermediate to advanced computer users.


Happy masking!

-Charles Forsyth
Powered by JForum 2.1.8 © JForum Team