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?
How to melt two images in one in Hollywood?
- Juan Carlos
- Posts: 950
- Joined: Mon Sep 06, 2010 1:02 pm
Re: How to melt two images in one in Hollywood?
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
- Juan Carlos
- Posts: 950
- Joined: Mon Sep 06, 2010 1:02 pm
Re: How to melt two images in one in Hollywood?
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?
How about:Juan Carlos wrote:I need one idea to join two images in one, Image1 add to Image2 to save in Image3 with both.
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")
- Juan Carlos
- Posts: 950
- Joined: Mon Sep 06, 2010 1:02 pm
Re: How to melt two images in one in Hollywood?
Thank you Jalih, I'll have test it to see if your routines is that I need.
Thank yo again for your help.
Thank yo again for your help.
- Juan Carlos
- Posts: 950
- Joined: Mon Sep 06, 2010 1:02 pm
Re: How to melt two images in one in Hollywood?
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.