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.

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

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 )

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):
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.