Previous Up Next

28.1.10  Blending images

The interp command interpolates two images linearly in the XYZ color space.

Example

To begin, load two images:

img1:=image("/home/luka/Pictures/xcas-logo.png")
     
an image of size 377×353 (RGB)           
img2:=image("/usr/local/share/giac/examples/Exemples/demo/terre.jpg")
     
an image of size 512×256 (RGB)           
display(img1); display(img2,400)

Now blend the two images together with t=0.6:

img:=interp(img1,img2,0.6)
     
an image of size 474×277 (RGB)           
display(img)

Previous Up Next