Results 1 to 5 of 5
Thread: Help with morphing a picture
-
Help with morphing a picture
This was asked to me in a private message by the new forum member, Stiamaa. As a favor to him and to comply with forum protocol, I am going to post his question here in the public New To Java forum:
His code:
Originally Posted by Stiamaa
Java Code:public class TestMorphing { public static void main(String[] args) { String start = FileChooser.pickAFile(); Picture startPicture = new Picture(start); int startWidth = startPicture.getWidth(); int startHeight = startPicture.getHeight(); String end = FileChooser.pickAFile(); Picture endPicture = new Picture(end); int endWidth = endPicture.getWidth(); int endHeight = endPicture.getHeight(); if(startWidth != endWidth || startHeight != endHeight) { SimpleOutput.showInformation("Files are not the same size."); } else { int rate = SimpleInput.getIntNumber("Enter int Number: "); Picture[] pictureArray; pictureArray = new Picture[rate + 2]; pictureArray[0] = startPicture; pictureArray[pictureArray.length - 1] = endPicture; Picture p1 = new Picture(); p1.morphStart(startPicture, endPicture, 5, 1); pictureArray[1] = p1; pictureArray[1].show(); Picture p2 = new Picture(); p2.morphStart(startPicture,endPicture, 5, 2); pictureArray[2] = p2; pictureArray[2].show(); } } }
-
Re: Help with morphing a picture
I suggest that you tell us more about exactly what problems you are having with this code -- does it compile? Does it run? Are you seeing any error messages or exceptions? If it runs, is it not behaving properly? The more information you can share with us, the better we can help you. I also encourage you to not ask questions like these in a private manner but to ask them in the forum for all to share, all to help with, and all to learn from.
- 11-12-2012, 06:07 AM #3
Member
- Join Date
- Nov 2012
- Posts
- 2
- Rep Power
- 0
Re: Help with morphing a picture
Sorry about that, and next time I will answer with by asking on the public forum. I tried compiling, but line 30 and 35, it cannot find the symbol.
-
Re: Help with morphing a picture
Which lines are 30 and 35?
- 11-12-2012, 04:26 PM #5
Member
- Join Date
- Nov 2012
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
One picture for each texture, or all in one picture
By JG4m3r in forum AndroidReplies: 1Last Post: 05-24-2012, 04:44 PM -
Movie Picture Morphing
By Mabyboi in forum Java 2DReplies: 1Last Post: 11-16-2011, 06:20 AM -
How do you make a morphing method with dr java ????! URGENT, HELP PLZ
By Peltoltura in forum New To JavaReplies: 2Last Post: 11-16-2011, 04:50 AM -
The Mystery of the auto-morphing variables
By Luxpsycho in forum Advanced JavaReplies: 3Last Post: 08-11-2011, 12:06 PM -
Morphing
By aRTx in forum New To JavaReplies: 4Last Post: 05-05-2009, 12:01 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks