Page 1 of 1
How to melt two images in one in Hollywood?
Posted: Sat Sep 17, 2011 11:56 am
by Juan Carlos
How to melt two images in one in Hollywood?
I want make this option in my old program Convierteme, the option of melt two images in one, for example to make one "ghost" effect in other image, with what instruction make this effect, to save after?
Re: How to melt two images in one in Hollywood?
Posted: Sat Sep 17, 2011 2:58 pm
by jalih
Here you are:
Code: Select all
@DISPLAY {Width = 640, Height = 480, Title = "Test Proggy..."}
@BRUSH 1, "bg.png", { LoadAlpha = True } ; Backgound image
@BRUSH 2, "fg.png", { LoadAlpha = True } ; foreground image
Function p_MainLoop()
SelectAlphaChannel(2)
SetAlphaIntensity(intensity)
Cls()
EndSelect()
intensity = intensity - 1
intensity = Wrap(intensity, 0, 255)
DisplayBrush(1, 0, 0)
DisplayBrush(2, 0, 0)
Flip()
EndFunction
intensity = 255
BeginDoubleBuffer()
SetInterval(1, p_MainLoop, 1000/20) ; 50fps
Repeat
WaitEvent
Forever
Re: How to melt two images in one in Hollywood?
Posted: Sat Sep 17, 2011 3:40 pm
by Juan Carlos
Thank you Jalih for your help but you routine isn't that I need, I need one idea to join two images in one, Image1 add to Image2 to save in Image3 with both.
Re: How to melt two images in one in Hollywood?
Posted: Sat Sep 17, 2011 3:57 pm
by jalih
Juan Carlos wrote:I need one idea to join two images in one, Image1 add to Image2 to save in Image3 with both.
How about:
Code: Select all
@DISPLAY {Width = 640, Height = 480, Title = "Test proggy, attempt 2 ;-)"}
@BRUSH 1, "data/bg.png", { LoadAlpha = True } ; Backgound image
@BRUSH 2, "data/fg.png", { LoadAlpha = True } ; foreground image
Function CreateGhostImg(target, bgImg, fgImg, percentage)
Local temp = CopyBrush(fgImg, Nil)
SelectAlphaChannel(temp)
SetAlphaIntensity(percentage / 100 * 255)
Cls()
EndSelect()
SelectBrush(target)
DisplayBrush(1, 0, 0)
DisplayBrush(temp, 0, 0)
EndSelect()
FreeBrush(temp)
EndFunction
CreateBrush(3, 640, 480)
CreateGhostImg(3, 1, 2, 50)
DisplayBrush(3, 0, 0)
WaitKeyDown("SPACE")
Re: How to melt two images in one in Hollywood?
Posted: Sat Sep 17, 2011 4:48 pm
by Juan Carlos
Thank you Jalih, I'll have test it to see if your routines is that I need.
Thank yo again for your help.
Re: How to melt two images in one in Hollywood?
Posted: Sun Sep 18, 2011 10:30 pm
by Juan Carlos
Thank you again Jalih for your help your routine works fine, now I want try to your routine works with three pictures for my next Amiga project.