Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

Looking for the book? They have it at the Engineer's Bookstore at 748 Marietta St NW. Here is there website: http://www.engrbookstore.com/ - Monica

Hotspots: Slides and CodeTA CornerComments?AnnouncementsFAQStatic Webspace
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Spring 2003 Homework 1 Questions

Comments, questions, suggestions?

Please do not post any solutions (working or not) in this space!. Let people try to work out in their groups. But feel free to ask questions, or even post your resultant images here! (Use the attach button above – see the Help button for, well, help.)

Did you get something fun?

Feel free to share it – post it here: Sp2003 HW1 Image Manipulation


I'm having the same problem the guy at the bottom had.
"I've got the program but my computer won't accept and of the pictures when I get to the pict=makePicture(file) part. It keeps saying:java.lang.IllegalArgumentException
java.lang.IllegalArgumentException: Width (-1) and height (0) must be > 0
[('/Users/csl/__compile__/media.py', 0, '__init__', None)]
Was unable to load the image in C:\Documents and Settings\Sarah Edwards\My Documents\My Pictures\Cawdor Sky.jpg"
I used the pictures that came on the CD and they didn't work. Page 120 says I may have the wrong version of Java. How do I know if its the wrong version, and if it is what should I do?
Luke Gurley

Here's what you should check:

  1. Make sure that it's a JPEG file. Filename should end in .jpg, .jpeg, or .jpe.
  2. Re-install Java from the CD in the java-install directory or from Sun (see Announcements-Spring 2003 for the exact URL). It doesn't hurt to re-install.
  3. Restart JES and if that doesn't work, restart your computer. It sometimes happens that something goes weird in your operating system where you can't access a file correctly.

i'm trying to post an image in the gallery but it asks for a password, what's the user name and password?
If you're off-campus, you'll be asked for a username and password. Username is 'attach' and password is 'carmen'. Mark Guzdial

When are we supposed to do the homeworks? Will you tell us in lecture?

You can find assignment due dates on the Syllabus and Lecture Slides-Spring 2003 page.

can we use any picture for homework 1? or are we supposed to use a given picture?

You can use any picture (that doesn't violate the GT web and network Usage Policies and Guidlines). But you don't want to use a very large picture because it will take a long time for your recipe to run.
Be creative! Have fun!

Is there a certain form that our program needs to be in? (for example, using the word "value" or not).

Nope – just make it work. Mark Guzdial


The instructions on the page say to call the program hw1. Do you mean the program name or the file name when we send it in?
Just the name of the program. But, do name the file something that relates to hw1 so we can identify it more easily Adam Wilson


Do we create a program to pick a file or do we give a specific file? I did both, but I was wondering which one you want sent?
Your program should work with any valid picture file without having to change your program. (pickAFile is one way to obtain that) -Jose

I'm still having turnin problems, it keeps giving me an error.

is it ok if there is more than one function in our program to do each thing? (meaning, if we have to type "decreaseRed" and "decreaseBlue" separately in the black part, and it doesn't run all at one time)?
Get it to run "all in one go". - Jose

I did my homework!!! This is so fun!
COOL! Post your picture, please, to show others what it might look like! Mark Guzdial

I've got the program but my computer won't accept and of the pictures when I get to the pict=makePicture(file) part. It keeps saying:java.lang.IllegalArgumentException
java.lang.IllegalArgumentException: Width (-1) and height (0) must be > 0
[('/Users/csl/__compile__/media.py', 0, '__init__', None)]
Was unable to load the image in C:\Documents and Settings\Sarah Edwards\My Documents\My Pictures\Cawdor Sky.jpg

Any ideas what I'm doing wrong??? Thanks


Try using pictures that Mr. Guzdial gave us. Those should work. Pictures from your own computer may or may not work right.

The reason this error comes up is because JES tries to load the file, but the file has some sort of bad data in it. This can occur for a variety of reasons, one of which, as mentioned above, is that the data might be in a strange format that JES doesn't recognize. The pictures in the mediasources folder on the CS1315 CD should always work. If you get the above error (or something quite similar) while trying to make a picture from a filename on the CD, please let a TA know! Jim Gruen

.Also, check the book. That error is described on page 120. Mark Guzdial.

I think my programming for Homework 1 works, but it's just taking a really long time on my computer- like 10 minutes. Is this just because my computer may be slow or is something wrong?
As long as you're using FOR loops, your program is guaranteed to stop one day. If your computer is slow, yes, it can take 10 minutes. Mark Guzdial


I just want to make sure that I've done this correctly. When you say "decrease the blue by 25%, you're saying that you want us to remove 25% of the blue, leaving the picture with 75% of the original amount of blue? Is that right? Or, when you say decrease the blue by 25%, do you mean multiply the existing amount of blue by .25. It makes sense to me to do the prior, but I want to be safe rather than sorry.
The first one is right Adam Wilson

I was able to turnin my work from another computer, but it will still not turnin from my computer.

I am trying to post a picture to the gallery, but it asks me for a user name and password, what do i use?

This same question appears at the top of the page...





Link to this Page