![]() ![]() |
| |||||||||
| This page removed for FERPA compliance | ||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| makeCollage(), it's fixed. Student56 |
| When you get that error, it means that your X or Y has gone beyond the edge of the picture. For example, if you're referencing X position 513 and the width of the picture is only 512, you'll get this error. You'll have to trace your code and figure out where you're going too far. Is the line referencing your source or target? If the target, there's an easy solution – use a bigger canvas! Mark Guzdial |
| What exactly are you typing? Did you look in the media folder and in the JES folder – those are the two places where writePictureTo might write the picture, if you don't give it a complete path. Mark Guzdial |
the 'r' has to be outside of the quotation marks. -Student1680 |
| 3. You have a choice between like 6 options of this to do: scaling, cropping, rotating, shifting/altering color, or making it darker/lighter. So yes, those are three different options. 2. You want to mirror after you have made all your other additions to the canvas. 1. And I'm not sure what you mean about the rotating? You can scale the picture if you want it to fill the canvas... Student117 |
| Don't forget that we give you a complete, working collage recipe on page 96 in the book. This works, but doesn't (a) take a single image and make four copies (it only does a couple copies) and (b) doesn't mirror. But other than that, it works. Start from there! Mark Guzdial |
| From the assignment: "Please share your results by uploading the image to the Fall 2004 HW2 Collages gallery. (This isn't a requirement, but we'd love to see them!)" So it is optional but it may break our hearts if you don't. | Bill Leahy |
| Yes, you mirror with the same size canvas. Remember there is a lower bound (1) and an upper bound (getWidth or getHeight). You can't go outside those bounds or you will get an error. | Bil Leahy |
| Yes. | Bill Leahy |
| You should do what it says in the asignment. this asignment says something to the effect of your TA should tpe makeCollage() and see a collage generated. This means that not only is it ok to leave show(canvas) in your function, you are supposed to leave it in. Note, this is not always the case. Side effects (show, writePictureTo, print, etc) are good in some situations and bad in others, so you should always default to what the asignment says. Student1594 |
| Any function that you plan to use, other than those defined in JES, you need to define in the program area. clearBlue, and decreaseRed are not defined in JES, so you will need to define them yourself. I'm not sure what you mean about the code following it, but if you're refering to where in the command area you define your functions, I don't beleive it matters which function you define first, but you can always try it and see. Student1594 |
| Yes. That is considered a color alteration. However, it is NOT scaling,cropping,rotating or mirroring just to be clear. Student1594 |
| You are going to be turning in your asignment through JES. On the asigment turning portion of JES, there's an area where you can attach other files to your submission. Here is where you attach your original and resultant image. As for writePictureTo, how are you calling it? Are you writing the write picture file? Are you specifying an entire path (i.e r"C\.... and not just "collage.jpg)? If you do not speficy the whole path, look for your picture in the JES folder. It may be there. If that did not help, find a TA at office hours on Monday (I'm there 11-12 in the CoC) and they should be able to help you with REMOVED specific problems. Student1594 |
| No. This will most likely cause your program to crash when your TA runs it. If you're writing it to C\mypictures and your TA does not have such a folder at the same place on his computer, JES will error. So for this asignment, do take that out before turnin. As a note, with your new knowledge of getMediaPath() you could get writePictureTo to not fail no matter which computer you run it on, but that's a separate issue, and you should leave writePictureTo() out of your turned in code. Student1594 |
| THis is becuase once you type return, the function will return and do no REMOVED. Return to the computer means exit the program and leave whatever I'm returning available, so your writePictureTo function is never being run. Try putting it before your return call. Return should in almost all cases be the last line on your function. Student1594 |
| You can as many multiple images as you would like, however one image must show up 4 times in 4 different ways, 1 of which must be either scaling,cropping,or rotating. Student1594 |
| There are lots of ways to do this: You could resize the basic picture before you even start or you can do it as part of the construction of the collage. On pages 104-106 of the text there are sample programs that rescale pictures. Let us know if you need REMOVED info. | Bill Leahy |
| Are you printing the picture? i.e. print pic That might do that. Email me your code. | Student1821 |
| Use username:attach password:carmen | Bill Leahy |
| This is also the second question on the FAQ page. Mark Guzdial |
| You are trying to submit your HW2 asignment through JES and it's not working? I can't find the original post you refer to so this is what I'm assuming your problem is. There are many reasons this could be happening. Is your internet connection fully functional (i.e. not going in and out) Have you previously been able to submit through JES before? You should let your TA know directly that you are having this problem so that he may be able to check and make sure there isn't a problem in the turnin system. Also, if you are still not able to submit through JES, look up the instructions from Lab1 on how to attach to the Coweb, and submit that way. Student1594 |
| Has anyone else had trouble submitting? Anonymous poster, please email your TA and/or your Instructor so that your name can be checked in the turnin pages (e.g., to make sure that JES is trying to do the right thing with it. How is your decreaseRed defined? My guess is that it's defined with NO input, but you're handing it a picture as input, so that's a mismatch between types for the parameter. Mark Guzdial |
| The blank 7X95 inch canvas is a .jpg file in media sources. You can make as many pictures from it as you want. | Bill Leahy |
| Never do that! You will need to get a new blank 7X95inch file from either your CD or you can re-download the media tools. In general, you should save files with different names than files you might want to keep. | Bill Leahy |
| Generally this means that you have the kind of error where you are drawing off of the picture. One thing to try is to pretend you are the computer and go through enough of your code writing down what each variable contains as the code executes. You may also want to get a hold of your TA or instructor and email or show them your code | Bill Leahy |
| I suppose flipping can be considered a sort of rotation | Bill Leahy |
| Well, for starters, an image file is in some folder. If the image file is in the media sources folder then it's not in the JES folder. JES is only going to look in the folder specified. It won't search through folders withing that folder. | Bill Leahy |
| Yes, absolutely. That is why it's provided. | Bill Leahy |
| You need to mirror the entire canvas | Bill Leahy |
| Your code is supposed to take a picture, and alter the image, place the altered forms (4 total, one of which CAN be the original) on the 7inX95in.jpg canvas. The images must be altered in your code, NOT previously altered!! Student1594 |
| You shouldn't be making 7inx95in.jpg – it's in your mediasources, from the CD. We care about the end result – alter them in the collage or before. Mark Guzdial |
| No, it shouldn't take 15 minutes. If you are connected to the internet and you have been able to submit before you should email your TA and tell them of your problem. You can also use the alternate turnin method described in Lab 1. | Bill Leahy |
| Start by looking at the example on pages 99-101 of your textbook. | Bill Leahy |
| What's the error message? Student56 |
When your program is half done with copying the pixels from one half to the other, they're exact mirror images of each other. The pixels that you were expecting to be written from the 2nd half onto the first half have been overwritten. One way to get around this is to create a separate canvas to copy your collage to. -Student1680 |
It's extremely hard to say what's wrong with your code without actually seeing it. But when it says that your code is illegal Jython the culprits usually are:
|
Sometimes when JES says there's a spacing error, the actual error is generated in the line directly before where it says the error is. -Student1680 |
| What log in name did you use? What is the name of the file you tried to upload? Your filename shouldn't contain any spaces! | Bill Leahy |
| Try submitting it by uploading it directly to the Coweb. Student1594 |
| Your four altered pictures should be placed on the 7inX95in.jpg canvas in your code. So whatever you call this in your code, (it's called canvas in all the book examples), this is what you want to mirror. Look in the book for two examples of code that mirrors a canvas, and at the end of your makeCollage() function, add a call to your mirror canvas function using your collage. Student1594 |
| You should be mirroring at the end of the code, after all of your other alterations to the collage have been made. Student1594 |
| That is dependant on how you've written your code, and is difficult to answer without seeing all of the code Student1594 |
| Try using one word as the variable for your picture. The program doesn't recognize spaces as part of a name. I would suggest just naming your variable picture or something else that is one word. Do this where you first choose your picture and replace all instances of Calo d'ascolto with your new (ONE WORD) variable Student1919 |