Results 1 to 2 of 2
  1. #1
    Mabyboi is offline Member
    Join Date
    Nov 2010
    Posts
    2
    Rep Power
    0

    Default Movie Picture Morphing

    Hi there,

    Im new to the forums and was wondering if you guys could give me a hand with something.... I've been writing this code for a computer science assignment and I cant get it to work. I have no clue why...
    XML Code:
    public class MorphingMovie
     {
       public static void main (String[] args)
       {
        
      String pic1 = FileChooser.pickAFile();
      Picture startPicture = new Picture(pic1);
      int startWidth = startPicture.getWidth();
      int startHeight = startPicture.getHeight();
    
      String pic2 = FileChooser.pickAFile();
      Picture endPicture = new Picture(pic2);
      int endWidth = endPicture.getWidth();
      int endHeight = endPicture.getHeight();
    
      if(startWidth !=endWidth || startHeight != endHeight)
         {
      SimpleOutput.showInformation("Sorry. Your files are not of the same size!");
      }
      else
      {
      int rate = SimpleInput.getIntNumber("Enter Integer Number: ");
        
        String directoryName = ("Z:/Movie1/");
        
      Picture[] pictureSequence;
      pictureSequence = new Picture[rate + 2];
      pictureSequence[0] = startPicture;
      pictureSequence[pictureSequence.length - 1] = endPicture;
        
        for (int i = 1; i <pictureSequence.length; i++)
      {
        Picture intermediate = new Picture(startWidth, startHeight);
        intermediate.morphStage(startPicture, endPicture, rate, 1);
        pictureSequence[i] = intermediate;
        }                     
      FrameSequencer frameSequencer = new FrameSequencer(directoryName);
      for (int i = 0; i < pictureSequence.length; i ++);
          {
        frameSequencer.addFrame(pictureSequence[i]);
          }
          MoviePlayer movie1 = new MoviePlayer(directoryName);
        movie1.playMovie(rate);
        }
     
     Picture[] sequence2;
     sequence2 = new Picture[rate + 2];
     int backwards = rate + i;
     
     for(int i = 0; i< sequence2.length; i++)
     {
       sequence2[i] = sequence2[backwards];
       backwards --;
     }
     FrameSequencer FrameSequencer = new FrameSequencer2();
     
     for (int i = 0; i < pictureSequence2.length; i++)
       {
          FrameSequencer2.addFrame(PictureSequence2[i]);
       }
       MoviePlayer movie2 = new MoviePlayer(directoryName2);
       movie2.playMovie(rate);
      }
     }
    Any help would be greatly appreciated, thanks.

  2. #2
    Peltoltura is offline Member
    Join Date
    Nov 2011
    Posts
    5
    Rep Power
    0

    Default Re: Movie Picture Morphing

    did you ever figure this out ? ,im having the same problem :S

Similar Threads

  1. movie
    By okabeer in forum AWT / Swing
    Replies: 3
    Last Post: 11-17-2011, 01:25 AM
  2. Movie control Package
    By ellias2007 in forum Java 2D
    Replies: 1
    Last Post: 10-28-2010, 01:04 AM
  3. Morphing
    By aRTx in forum New To Java
    Replies: 4
    Last Post: 05-05-2009, 01:01 PM
  4. MeD's Movie Manager 2.5.4.1
    By levent in forum Java Software
    Replies: 0
    Last Post: 07-26-2007, 09:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •