0

i need to use crossfade function to to this. i need some help
please, i am new at this. any help would be great. i have done a program than makes a double image but this need to happen slowly.

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by marksman123
0

What library are you using? This can be easily accomplished in pygame. google something like 'pygame image fade'

0

What library are you using? This can be easily accomplished in pygame. google something like 'pygame image fade'

i am using JES, its not that i need to use the program, i just need to make it. this is what i have so far. i got stuck at the for statements.

def main():
  showInformation( "Pick two pictures of the same size." )
  pic1= makePicture( pickAFile() )
  pic2= makePicture( pickAFile() )
  
  w=getWidth( pic1 )
  h=getHeight( pic1 )
  assert w == getWidth( pic2 )
  assert h == getHeight( pic2 )
  newPic= makeEmptyPicture( w,h )
  
  printNow( "working..." )
  for x in range (0,w) :
    for y in range (0,w) :
      px1= getPixel( pic1, x, y )
      px2= getPixel( pic2, x, y )
      pxNew= getPixel( newPic, x, y )
      setRed(
      setGreen(
      setBlue(
      
  printNow( "...done" )
  show( newPic )
0

I am doing the same exact thing in JES and am having trouble as well. here is what I got so far. . .

def fadeImage():
  pic= makePicture("C:\Users\Ben\Pictures\Newpic.png")
  pic2= makePicture("C:\Users\Ben\Pictures\Newpic1.png")
  h= getHeight(pic)
  w= getWidth(pic)
  h2= getHeight(pic2)
  w2= getWidth(pic2)
  if h != h2 and w != w2:
    showInformation("The pictures are not the same size")
  else:
    crossFade(pic, pic2)
    
    
def crossFade():
  a= duplicatePicture(pic)
  b= deuplicatePicture(pic2)
  h= getHeight(pic)
  w= getWidth(pic)
  h2= getHeight(pic2)
  w2= getWidth(pic2)
  newPic= makeEmptyPicture(w, h, white)
  for x in range(0, h):
    for y in range(0, y):

Edited by Narue: Added code tags

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.