Log in

View Full Version : Overlay Logo With Drop Shadow


kevo777
31st May 2008, 04:15
Okay...I've searched all over this forum. I've seen lots of logo questions but none have addressed a logo that has drop shadow. I can get the image to appear in the corner just as I need but the drop shadow doesn't show up that I've applied to the original image. I have a feeling it has something to do with masking and alpha channels or whatever but I just can't wrap my head around it, even after hours of tweaking all the settings.

video=avisource("D:\~DV_Backups\California\tape.01\clip.08.avi").converttorgb32()
logo=imagesource("D:\logo-001.tif").converttorgb32()
maskclip=colorkeymask(logo,$000000,60)
clip=overlay(video,logo,mask=showalpha(maskclip),x=1,y=1,mode="blend",opacity=0.3)
return clip

That's my script. What am I doing wrong?

mikeytown2
31st May 2008, 04:46
Instead of overlay try Layer (http://avisynth.org/mediawiki/Layer). Also with imagesource (http://avisynth.org/mediawiki/ImageSource) try this

imagesource("D:\logo-001.tif", use_DevIL=true, pixel_type="RGB32")


edit mod: corrected script

kevo777
31st May 2008, 05:28
mikeytown2,

WOW!! Brother...you've brought tears to a grown man's eyes! I thank you, sir! That is exactly what I needed!!

God Bless the Doom9 forums!!! I'm here for life!

mikeytown2
31st May 2008, 06:14
Glad to help. I put the wiki (http://avisynth.org/mediawiki/Main_Page) in my favorites, it helps me a lot!

kevo777
31st May 2008, 15:22
Yeah I hear that. I have it bookmarked as well. AviSynth's wiki is a great resource, very well done thus far. I had tried the Layer command in the past unsuccessfully [shrug]. Not sure what I was missing then.

mikeytown2
31st May 2008, 16:43
You needed the alpha channel of the tiff, for the drop shadow. Imagesource defaults to RGB24, you needed RGB32. pixel_type="RGB32" is the key. Here is the entry in the wiki on the subject
pixel_type = RGB24: Added in v2.56, and allow the output pixel format to be specified, Y8 (8-bit greyscale), RGB24 and RGB32 are supported. The alpha channel is loaded only for RGB32 and only if DevIL supports it for the loaded image format.