View this PageEdit this Page (locked)Attachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

Collage Questions

Enter your Collage Questions here!


How do you save your collage?

Barbara Ericson Use the write(fileName) method of Picture. So if I have a picture object named picture and I want to write it to the mediasources directory with the name collage.jpg:

pictture.write(Picture.getMediaPath("collage.jpg"));

What am I doing wrong?
Using the sample "copyKatie" from class I get this error:
> targetPicture.write(Picture.getMediaPath("collage.jpg"));
Error: Undefined class 'targetPicture'

Barbara Ericson Did you declare targetPicture? You probably used a different name than targetPicture for your variable name. Use whatever you called your picture object.

How do you save a picture once you have changed it from its original form to a negative or mirror etc.?
sheila

Barbara Ericson Use the write(fileName) method as shown as the answer to the first question on this page.

Or
Do you code the picture within the collage code to change the picture to mirror etc?
sheila

Barbara Ericson You can do either. You can either do each of the picture changes in the collage code and then copy all 4 to the 7 by 9.5 white picture in teh collage code or first change each picture and write it out and then copy each saved picture to the collage.


I keep getting "expected class or interface" errors. Maybe I'm just trying to make it too complicated. Should I just save each altered picture separately and then place them on the canvas. I have been trying to alter and place at the same time. Thanks!–Debby

Barbara Ericson This error usually means that you put your method after the end of the class definition (after the last closing curly brace). You can check this with positioning the cursor to the right of the curly brace and this will highlight in blue all the code inside that pair of curly braces. You probably just need to move the closing curly brace after your method.

You can save each altered picture separately and then copy them one at a time or do it all at once. Do whatever is easier for you

Link to this Page