PDA

View Full Version : Using Overlay


kastion
03-06-2006, 02:26 PM
I'm using CFMX to call the object, but seem be having problems with overlay. I have the following lines just a bit after the SetLogPath line

flxOverlay = flxEngine.GetOverlayOptions();
flxOverlay.SetUseOverlay(1);
flxOverlay.SetUseMask(1);
flxOverlay.SetOverlayPath("http://www.mysite.com/test/flix/watermark.bmp");

Once the video is done encoding I'm not seeing my watermark.

The SetUseOverlay method enables/disables overlay. By default, overlay is disabled. If you enable overlay, you must specify an overlay file using
This is set.

The SetOverlayPath method sets the input image path to be used as an overlay. The source image can be a BMP, GIF, PNG, or TIFF image, among others. The overlay image will not be scaled.
This is set, although I was a little confused.
A string containing the output HTML file path.
Am I passing the path wrong?
The SetUseMask method sets enabling/disabling masking on the overlay. When masking is enabled, the color values specified in SetMaskPixelX and SetMaskPixelY becomes a transparent color. Any part of the overlay that contain this color will not be rendered (the video behind those pixels will show).
When SetMaskPixelX & SetMaskPixelY are not set, it defaults to position 0,0. My bmp is a 320x240 image with the logo in the corner and the rest of the image white, so it should display in the bottom right and all the white will be transparent? I'm not even seeing a watermark so I'm not sure if this is working. I tried with both a gif and no SetUseMask and with a bmp and SetUseMask on, with no success. Can anyone tell me what I'm doing wrong? Thanks.

kastion
03-06-2006, 03:01 PM
Managed to figure it out it was a way the path in coldfusion was being set, I had to place my image in a specific working directory and just pass the file name by itself to the function. SetOverlayPath("watermark.bmp");

kastion
03-31-2006, 10:46 AM
For reference if anyone is using Coldfusion and would like to know how to use overlay here's how it goes.

Somewhere in your conversion script you need:


flxOverlay = flxEngine.GetOverlayOptions();
flxOverlay.SetUseOverlay(1);
flxOverlay.SetOverlayPath("watermark.bmp");


Put the file "watermark.bmp" in your "bin" directory of coldfusions installation root. And that's it.

I suggest you don't try anything too fancy and stick to grayscale, you can get jagged lines and sometimes new colors around your watermark.