Giter VIP home page Giter VIP logo

mediacomp-jes's Introduction

** What's in the repository:

README: this file
testusermanual2.pdf: old testing manual

jes/ : all source files for the most recent version of JES
Release Build Tools/ : tools, scripts, and instructions for building release versions of JES for Mac, Windows, and Linux

attic/ : Files you probably don't need that often.
attic/jes-1315.tar.bz2: tarball of the version cs1315 had been distributing
attic/jes-216.tar.bz2: the build before we started this semester
attic/JES-visualstudio.zip : the visual studio project for building the jes
windows executable.

wiki/ : The Google Code wiki pages

branches/ : currently empty, we do not make use of branches at this time in JES development
tags/ : currently empty
trunk/ : currently empty

mediacomp-jes's People

Watchers

James Cloos avatar

mediacomp-jes's Issues

problem with makeMovieFromInitialFrame

What steps will reproduce the problem?
1.make a movie
2.
3.

What is the expected output? What do you see instead?
Frames are not picked up in order.  


What version of the product are you using? On what operating system?
Mac 10.5.8, Jes 4.3


Please provide any additional information below.
this is a lab environment.  all machines run copies of the same environment.  
is there something
in the setup that might control this.

Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 12:48

Code in program area can be outside of a function

Code not placed in a function in the program area is executed when the program 
is loaded.  Is 
this a bug? Feature? Based on the corresponding text, it seems like it's a very 
misleading bug 
which can promote bad practices!

Student example:

def main():
  loadPictures()
  saveComic()

setMediaPath()
titlePic=makePicture(getMediaPath("pictureTitle.jpg"))
firstPic=makePicture(getMediaPath("pictureOne.jpg"))
secondPic=makePicture(getMediaPath("pictureTwo.jpg"))
thirdPic=makePicture(getMediaPath("pictureThree.jpg"))
fourthPic=makePicture(getMediaPath("pictureFour.jpg"))
bg=makePicture(getMediaPath("background.jpg"))

def loadPictures():
  posterize(thirdPic)
  chromakey(titlePic,bg)
  drawBorder(titlePic)
  drawBorder(firstPic)
  drawBorder(secondPic)
  drawBorder(thirdPic)
  drawBorder(fourthPic)
  addText(titlePic,234,411,"Bench Hunting: A Comic Strip by XXXXXX")
  addText(firstPic,21,445,"This bench is great! Come try it!")
  addText(firstPic,435,131,"Okay!")
  addText(secondPic,94,86,"Let's try to find a more comfortable one!")
  addText(secondPic,486,177,"As long as the bench is fierce")
  addText(thirdPic,42,139,"This bench is comfortable!")
  addText(thirdPic,260,68,"This isn't a bench")
  addText(thirdPic,525,147,"Not fierce enough")
  addText(fourthPic,162,38,"You know what the most comfortable bench is? A couch.")
  addText(fourthPic,502,89,"I hope it's animal print")
  layoutComic()


def posterize(thirdPic):
  for p in getPixels(thirdPic):
    red=getRed(p)
    green=getGreen(p)
    blue=getBlue(p)

    if(red<64):
      setRed(p,31)
    if(red>63 and red<128):
      setRed(p,95)
    if(red>127 and red<192):
      setRed(p,192)
    if(red>191 and red<256):
      setRed(p,223)

    if(green<64):
      setGreen(p,31)
    if(green>63 and green<128):
      setGreen(p,95)
    if(green>127 and green<192):
      setGreen(p,192)
    if(green>191 and green<256):
      setGreen(p,223)

    if(blue<64):
      setBlue(p,31)
    if(blue>63 and blue<128):
      setBlue(p,95)
    if(blue>127 and blue<192):
      setBlue(p,192)
    if(blue>191 and blue<256):
      setBlue(p,223)

def chromakey(titlePic,bg):
  for x in range(0,getWidth(titlePic)):
    for y in range(0,getHeight(titlePic)):
      p=getPixel(titlePic,x,y)
      if (getRed(p)+getBlue(p)<getGreen(p)):
        setColor(p,getColor(getPixel(bg,x,y)))
  return titlePic
  show(titlePic)

def drawBorder(titlePic):
  w = getWidth(titlePic)
  h = getHeight(titlePic)
  for x in range(0,w):
    pix = getPixel(titlePic,x,0)
    setColor(pix,black)
    pix = getPixel(titlePic,x,1)
    setColor(pix,black)
    pix = getPixel(titlePic,x,h-1)
    setColor(pix,black)
    pix = getPixel(titlePic,x,h-2)
    setColor(pix,black)
  for y in range(0,h):
    pix = getPixel(titlePic,0,y)
    setColor(pix,black)
    pix = getPixel(titlePic,1,y)
    setColor(pix,black)
    pix = getPixel(titlePic,w-2,y)
    setColor(pix,black)
    pix = getPixel(titlePic,w-1,y)
    setColor(pix,black)

def drawBorder(firstPic):
  w = getWidth(firstPic)
  h = getHeight(firstPic)
  for x in range(0,w):
    pix = getPixel(firstPic,x,0)
    setColor(pix,black)
    pix = getPixel(firstPic,x,1)
    setColor(pix,black)
    pix = getPixel(firstPic,x,h-1)
    setColor(pix,black)
    pix = getPixel(firstPic,x,h-2)
    setColor(pix,black)
  for y in range(0,h):
    pix = getPixel(firstPic,0,y)
    setColor(pix,black)
    pix = getPixel(firstPic,1,y)
    setColor(pix,black)
    pix = getPixel(firstPic,w-2,y)
    setColor(pix,black)
    pix = getPixel(firstPic,w-1,y)
    setColor(pix,black)

def drawBorder(secondPic):
  w = getWidth(secondPic)
  h = getHeight(secondPic)
  for x in range(0,w):
    pix = getPixel(secondPic,x,0)
    setColor(pix,black)
    pix = getPixel(secondPic,x,1)
    setColor(pix,black)
    pix = getPixel(secondPic,x,h-1)
    setColor(pix,black)
    pix = getPixel(secondPic,x,h-2)
    setColor(pix,black)
  for y in range(0,h):
    pix = getPixel(secondPic,0,y)
    setColor(pix,black)
    pix = getPixel(secondPic,1,y)
    setColor(pix,black)
    pix = getPixel(secondPic,w-2,y)
    setColor(pix,black)
    pix = getPixel(secondPic,w-1,y)
    setColor(pix,black)

def drawBorder(thirdPic):
  w = getWidth(thirdPic)
  h = getHeight(thirdPic)
  for x in range(0,w):
    pix = getPixel(thirdPic,x,0)
    setColor(pix,black)
    pix = getPixel(thirdPic,x,1)
    setColor(pix,black)
    pix = getPixel(thirdPic,x,h-1)
    setColor(pix,black)
    pix = getPixel(thirdPic,x,h-2)
    setColor(pix,black)
  for y in range(0,h):
    pix = getPixel(thirdPic,0,y)
    setColor(pix,black)
    pix = getPixel(thirdPic,1,y)
    setColor(pix,black)
    pix = getPixel(thirdPic,w-2,y)
    setColor(pix,black)
    pix = getPixel(thirdPic,w-1,y)
    setColor(pix,black)

def drawBorder(fourthPic):
  w = getWidth(fourthPic)
  h = getHeight(fourthPic)
  for x in range(0,w):
    pix = getPixel(fourthPic,x,0)
    setColor(pix,black)
    pix = getPixel(fourthPic,x,1)
    setColor(pix,black)
    pix = getPixel(fourthPic,x,h-1)
    setColor(pix,black)
    pix = getPixel(fourthPic,x,h-2)
    setColor(pix,black)
  for y in range(0,h):
    pix = getPixel(fourthPic,0,y)
    setColor(pix,black)
    pix = getPixel(fourthPic,1,y)
    setColor(pix,black)
    pix = getPixel(fourthPic,w-2,y)
    setColor(pix,black)
    pix = getPixel(fourthPic,w-1,y)
    setColor(pix,black)

canvas=makeEmptyPicture((getWidth(titlePic)+getWidth(firstPic)+getWidth(secondPi
c)+getWidth(t
hirdPic)+getWidth(fourthPic)),getHeight(firstPic),lightGray)

def layoutComic():
  targetX=0
  for sourceX in range(0,getWidth(titlePic)):
    targetY=getHeight(canvas)-getHeight(titlePic)-30
    for sourceY in range(0,getHeight(titlePic)):
      px=getPixel(titlePic,sourceX,sourceY)
      cx=getPixel(canvas,targetX,targetY)
      setColor(cx,getColor(px))
      targetY=targetY+1
    targetX=targetX+1
  targetX=getWidth(titlePic)
  for sourceX in range(0,getWidth(firstPic)):
    targetY=getHeight(canvas)-getHeight(firstPic)
    for sourceY in range(0,getHeight(firstPic)):
      px=getPixel(firstPic,sourceX,sourceY)
      cx=getPixel(canvas,targetX,targetY)
      setColor(cx,getColor(px))
      targetY=targetY+1
    targetX=targetX+1
  targetX=(getWidth(titlePic)+getWidth(firstPic))
  for sourceX in range(0,getWidth(secondPic)):
    targetY=getHeight(canvas)-getHeight(secondPic)
    for sourceY in range(0,getHeight(secondPic)):
      px=getPixel(secondPic,sourceX,sourceY)
      cx=getPixel(canvas,targetX,targetY)
      setColor(cx,getColor(px))
      targetY=targetY+1
    targetX=targetX+1
  targetX=(getWidth(titlePic)+getWidth(firstPic)+getWidth(secondPic))
  for sourceX in range(0,getWidth(thirdPic)):
    targetY=getHeight(canvas)-getHeight(thirdPic)
    for sourceY in range(0,getHeight(thirdPic)):
      px=getPixel(thirdPic,sourceX,sourceY)
      cx=getPixel(canvas,targetX,targetY)
      setColor(cx,getColor(px))
      targetY=targetY+1
    targetX=targetX+1
  targetX=(getWidth(titlePic)+getWidth(firstPic)+getWidth(secondPic)+getWidth(thirdPic))
  for sourceX in range(0,getWidth(fourthPic)):
    targetY=getHeight(canvas)-getHeight(fourthPic)
    for sourceY in range(0,getHeight(fourthPic)):
      px=getPixel(fourthPic,sourceX,sourceY)
      cx=getPixel(canvas,targetX,targetY)
      setColor(cx,getColor(px))
      targetY=targetY+1
    targetX=targetX+1  
  show(canvas)
  return(canvas)

def saveComic():
  writePictureTo(canvas,"brill3.jpg")

Original issue reported on code.google.com by [email protected] on 14 Apr 2010 at 6:36

jes-4-2-1 does not execute

What steps will reproduce the problem?
1. Download jes-4-2-1 (with java)
2. Extract files into a directory 
3. Double click on the JES application.

What is the expected output? What do you see instead?
I expect the application to open. The application does not open. I never 
see the "python"


What version of the product are you using? On what operating system?
I am trying to download version 4-2-1 to run on a windows machine running 
XP Pro


Please provide any additional information below.
I have just downloaded and extracted version 4-2 and it opens and works?

Original issue reported on code.google.com by [email protected] on 8 Sep 2009 at 7:52

FrameSequencer

Barb developed FrameSequencer to make it easier to build movies.  We need
to investigate to see if we'd like to build wrapper APIs so that this
object's features can be used inside of JES.

Original issue reported on code.google.com by [email protected] on 20 May 2009 at 3:45

Default font size in IDE is Huge at times

Some machines seem to have an extra large font used by default for the
editor and interaction pane.  I saw this at workshops with people who had
never run JES before.  We may want to look into this a bit, but it's not a
serious issue.

Original issue reported on code.google.com by [email protected] on 5 Aug 2009 at 2:16

Can't flush stdout before asking for user input

What steps will reproduce the problem?

import sys
def test():
  print "I am testing"
  sys.stdout.flush()
  value = input("enter integer")
  print value

What is the expected output? What do you see instead?

Expected:  
  I am testing 
  enter integer 
....

Instead:
  The print statement is not flushed to the screen.



What version of the product are you using? On what operating system?
  JES 4.3


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 21 Sep 2010 at 10:03

Multiline strings aren't syntax higlighted properly

Multi-line strings (delineated with 3 single quotes, or 3 double quotes)
are not correctly colored as a string in JES 4.3.

Example:

def stringFun():
 'this is a string'
 "this isn't a string"
 print ''' multiline
 string is here'''

-Jay Summett

Original issue reported on code.google.com by [email protected] on 29 Mar 2010 at 1:24

JES 3.2 writePictureTo() fails with error

What steps will reproduce the problem?
1. >>> writePictureTo(pic, pickAFile())

What is the expected output? What do you see instead?
The file should be saved after the pickAFile() dialogue appears.  Instead
this is the result:

>>> pic = makePicture(pickAFile())
>>> writePictureTo(pic, pickAFile())
The error was:pict
Name not found globally.
A local or global name could not be found. You need to define the function
or variable before you try to use it in any way.

What version of the product are you using? On what operating system?
Function works fine in 3.1.1.  The problem exists as of version 3.2. 
Tested on Windows XP and Windows Vista.  Did not test 4.2.

Please provide any additional information below.
It would appear from the error message that a variable is misspelled in the
code for the writePictureTo() function.

Original issue reported on code.google.com by [email protected] on 17 Aug 2009 at 8:38

Trying to import JES libraries in Jython 2.2.1

What steps will reproduce the problem?
1. Starting Jython 2.2.1 shell
2. Using the following commands (pg 227 in Intro to Computing and Programming 
in Python):
>>> import sys
>>> sys.path.insert(0,"C:\Program Files\JES 4.3\Sources")
>>> from media import *
3. These lines cause a series of "ClassNotFound Exceptions" starting
on line 183 in media.py (in the Sources directory).

If I comment out lines 184-204 in media.py (namely the makeEmptySound function 
and the makeEmptySoundBySeconds function), the lines above work and I am able 
to use the majority of the JES library.

What is the expected output? What do you see instead?
Expected successful import of all items in media.py.  Get an error instead.

What version of the product are you using? On what operating system?
Using JES 4.3, Jython 2.2.1, on Windows Vista

Please provide any additional information below.
I should note that I had no issues utilizing the image/color functions in the 
library outside the JES.


Original issue reported on code.google.com by [email protected] on 16 May 2011 at 7:07

Samples Object Issues

We need to make the samples object work properly in jython with getSamples,
getSampleAt and for printing.  We should implement it as a sequence object
but cover the necessary python meta programming facilities so that print
does the right thing on the python side.

Original issue reported on code.google.com by [email protected] on 20 May 2009 at 3:48

Zip & Email / Upload / ...

It would be nice for the environment to zip up source code files and required 
media files for grading 
submission.  Then the student could email to instructor, upload to course 
management system, 
ftp...? Something.... 

My students don't understand that they need to upload both the source code 
files and the media 
files in specific programs where the code depends on the media files.

Original issue reported on code.google.com by [email protected] on 12 Apr 2010 at 5:21

Strangeness in parameters for sampling rates

The code is designed to behave this way, but we may want to review it as it
is inconsistent.  As it stands now, getsamplingrate() returns a double but
then make empty sound takes an int sampling rate.  This requires users to
cast values to when say creating an empty sound with the same sampling rate
as an existing sound.  It could be cleaner, though this change could
potentially break other code and/or textbook examples, so we need to look
into it to decide if a change is warranted.

Original issue reported on code.google.com by [email protected] on 5 Aug 2009 at 2:21

Add instructions for including JMusic

We need a readme file that explains how to easily incorporate JMusic into
JES.  Best case scenario, we'd also edit the default classpaths to include
the JMusic jar if it's present so that people just have to place the jar
appropriately.

Original issue reported on code.google.com by [email protected] on 20 May 2009 at 3:42

autoindent on newline

It would be nice if the editor automatically tabbed into the current
indentation level when you hit enter.  This would work similar to how IDLE
behaves.

Original issue reported on code.google.com by [email protected] on 5 Aug 2009 at 2:22

JES 4.3 downloads but when I click its icon, the environment never comes up

What steps will reproduce the problem?
1. download JES
2. click the icon
3.

What is the expected output? What do you see instead?
I expect for the environment to come up, but it doesn't. the intro picture (the 
one of the python) comes up but the environment doesn't follow

What version of the product are you using? On what operating system?
I'm using 4.3 on Windows Vista

Please provide any additional information below.
I downloaded JES with no Java first, but it didn't work. I deleted it and tried 
every other version of JES with no success

Original issue reported on code.google.com by [email protected] on 26 Aug 2010 at 4:01

Errors on sound format incompatibility not shown

When attempting to open a 4bit wav file, no message is displayed in JES,
but the sound object is not properly instantiated, leading to null pointer
exceptions at any later point.  It turns out that an exception is displayed
on the console about the inability to read this file format, but we really
need that output to appear in JES.

Original issue reported on code.google.com by [email protected] on 5 Aug 2009 at 2:27

Cannot true of logging in version 4.3

What steps will reproduce the problem?
1.Do not select logging
2.Save a session as a .py file
3. log out   .pylog file appears

What is the expected output? What do you see instead?
I expected to see only the file I saved not the .pylog file since I did not 
select logging.


What version of the product are you using? On what operating system?
JES 4-3 under Windows XP pro.


Please provide any additional information below.
This problem was present in 4.2 and 4-2-1 as well. Actually I just discovered 
that the way to turn logging off is to select the logging option! 

Original issue reported on code.google.com by [email protected] on 25 Aug 2010 at 7:32

Erroneous text input with unmatched parentheses

"Weirdest bug: I was typing some code on a line where I had two open left
parens ("((") and no closing right parens.  I went down to the next line
and started typing -- AND MY TEXT SHOWED UP ON BOTH THE WHITESPACE LINE AND
ON THE LINE WITH THE TWO LEFT PARENS!  Every character I typed showed up on
BOTH lines!  I hit backspace a few times, filled in the right parens, and
everything started working again.  Then, maybe an hour later, it happened
to one of the students!  Clearly, there's a bug in the paren matching code."

Original issue reported on code.google.com by [email protected] on 5 Jun 2009 at 6:30

Explorers/shows don't clean themselves up properly (dispose)

world, picture, sound, explorers dont' close properly--they still have
their process running apparently, this was obvious on a linux box.  Perhaps
because show and explore don't actually use the display using the swing thread

framesequencer also has unsafe show method

Original issue reported on code.google.com by [email protected] on 5 Aug 2009 at 2:23

print statement doesn't work

What steps will reproduce the problem?
1.If I load a simple "hello, world" program (print "Hello, world!" nothing is 
printed in the interaction pane.
2.If I have variables, I can tell that the program has executed, but nothing 
prints.
3.

What is the expected output? What do you see instead? "Hello, world!"


What version of the product are you using? On what operating system?
4.3 on Windows NT


Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 11 Jul 2010 at 2:17

Windows installers to simplify the process

While it is easy to build installers for JES, there are some problems with
doing this on Vista.  Vista prohibits write access to the program files
directory, and JES crashes because jython is unable to write to the cache
directory.  To make this work, we'll have to figure out how to point the
cache directory elsewhere on Vista.

Original issue reported on code.google.com by [email protected] on 27 Aug 2009 at 8:19

Save Project Environment at once

Would be nice if we could save all the variable bindings and things that
are active in the interaction pane like Matlab does.

From MediaComp Workshop at GT Aug 6

Original issue reported on code.google.com by [email protected] on 6 Aug 2009 at 6:45

Port to Jython 2.5

When Jython 2.5 is released and JES is stable at next release, investigate
porting to jython 2.5

Original issue reported on code.google.com by [email protected] on 20 May 2009 at 3:49

Show bit size in sound explorer somehow

Sounds read from different bit levels behave a bit strangely and we don't
provide indication of the bit levels in the explorer tools.  For example,
opening an 8bit sound looks fine in explorer, but when copied to a new 16
bit sound, the values are clearly 256x quieter.  Our tools could provide a
better indication that this is the case to make it more obvious that a
scaling factor needs to be applied when copying.  

Original issue reported on code.google.com by [email protected] on 5 Aug 2009 at 2:26

Can't see anything in v4.3

What steps will reproduce the problem?
1.Opening the program in windows 7
2.
3.

What is the expected output? What do you see instead?
Whenever I try to type anything into the command or interactions area, 
nothing happens. The program recognizes that things are being input into 
the program, but nothing appears in either area.

What version of the product are you using? On what operating system?
This problem existed in versions 4.3 and 4.2.1 when opened using windows 7

Please provide any additional information below.
The program has run correctly before several times, then every time after 
has failed to work correctly

Original issue reported on code.google.com by [email protected] on 14 Apr 2010 at 12:33

Color wrap-around not saving the first time in options menu

"I went into the Options, checked the box, and hit save.  I wrote and ran
the increaseRed code -- but all the increases were fine, not wrap-arounded.
 I went back into Options -- AND THE BOX WASN'T CHECKED!  It didn't save my
setting.  I did it again (checked and saved), and then all was well."

Original issue reported on code.google.com by [email protected] on 5 Jun 2009 at 6:32

playNote function not working

What steps will reproduce the problem?
1. playNote(60, 1000)

What is the expected output? What do you see instead?
I expect to hear a note.  Instead I get silence.

What version of the product are you using? On what operating system?
I am running this on JES 4.2.1.  I tried it in JES 4.2 and it works.

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 21 Sep 2009 at 9:16

The function "bin" is not found globally

What steps will reproduce the problem?
1.bin(24)
2.
3.

What is the expected output? What do you see instead?
Expect    '0b11000'
Instead 
>>> bin(24)
The error was:bin
Name not found globally.
A local or global name could not be found. You need to define the function 
or variable before you try to use it in any way.

What version of the product are you using? On what operating system?
Version 4.2.1 in Windows XP

Please provide any additional information below.
hex and oct work!

Original issue reported on code.google.com by [email protected] on 10 Nov 2009 at 9:57

More Unit Tests

We need to develop more individual unit tests as well as a general test
plan to be executed prior to releases.

Original issue reported on code.google.com by [email protected] on 20 May 2009 at 3:44

Check setLibPath functionality

setLibPath should be appending to the library path, and not replacing it. 
That is, media.py should still be working after we do this.

Original issue reported on code.google.com by [email protected] on 20 May 2009 at 3:46

Multiple function definitions permitted in code area...

Multiple functions definitions (with same signature) can be declared in the 
program area.  Since 
no error seems to be generated, I'm assuming that only the last one is 
loaded/used. However, 
from the student's perspective, it compiles fine and promotes ambiguity. 

Student code sample: (note the multiple drawBorder definitions used for each 
picture. Sure, the 
student doesn't really understand functional abstraction, but the compiler 
permitted this code.

def main():
  loadPictures()
  saveComic()

setMediaPath()
titlePic=makePicture(getMediaPath("pictureTitle.jpg"))
firstPic=makePicture(getMediaPath("pictureOne.jpg"))
secondPic=makePicture(getMediaPath("pictureTwo.jpg"))
thirdPic=makePicture(getMediaPath("pictureThree.jpg"))
fourthPic=makePicture(getMediaPath("pictureFour.jpg"))
bg=makePicture(getMediaPath("background.jpg"))

def loadPictures():
  posterize(thirdPic)
  chromakey(titlePic,bg)
  drawBorder(titlePic)
  drawBorder(firstPic)
  drawBorder(secondPic)
  drawBorder(thirdPic)
  drawBorder(fourthPic)
  addText(titlePic,234,411,"Bench Hunting: A Comic Strip by XXXX")
  addText(firstPic,21,445,"This bench is great! Come try it!")
  addText(firstPic,435,131,"Okay!")
  addText(secondPic,94,86,"Let's try to find a more comfortable one!")
  addText(secondPic,486,177,"As long as the bench is fierce")
  addText(thirdPic,42,139,"This bench is comfortable!")
  addText(thirdPic,260,68,"This isn't a bench")
  addText(thirdPic,525,147,"Not fierce enough")
  addText(fourthPic,162,38,"You know what the most comfortable bench is? A couch.")
  addText(fourthPic,502,89,"I hope it's animal print")
  layoutComic()


def posterize(thirdPic):
  for p in getPixels(thirdPic):
    red=getRed(p)
    green=getGreen(p)
    blue=getBlue(p)

    if(red<64):
      setRed(p,31)
    if(red>63 and red<128):
      setRed(p,95)
    if(red>127 and red<192):
      setRed(p,192)
    if(red>191 and red<256):
      setRed(p,223)

    if(green<64):
      setGreen(p,31)
    if(green>63 and green<128):
      setGreen(p,95)
    if(green>127 and green<192):
      setGreen(p,192)
    if(green>191 and green<256):
      setGreen(p,223)

    if(blue<64):
      setBlue(p,31)
    if(blue>63 and blue<128):
      setBlue(p,95)
    if(blue>127 and blue<192):
      setBlue(p,192)
    if(blue>191 and blue<256):
      setBlue(p,223)

def chromakey(titlePic,bg):
  for x in range(0,getWidth(titlePic)):
    for y in range(0,getHeight(titlePic)):
      p=getPixel(titlePic,x,y)
      if (getRed(p)+getBlue(p)<getGreen(p)):
        setColor(p,getColor(getPixel(bg,x,y)))
  return titlePic
  show(titlePic)

def drawBorder(titlePic):
  w = getWidth(titlePic)
  h = getHeight(titlePic)
  for x in range(0,w):
    pix = getPixel(titlePic,x,0)
    setColor(pix,black)
    pix = getPixel(titlePic,x,1)
    setColor(pix,black)
    pix = getPixel(titlePic,x,h-1)
    setColor(pix,black)
    pix = getPixel(titlePic,x,h-2)
    setColor(pix,black)
  for y in range(0,h):
    pix = getPixel(titlePic,0,y)
    setColor(pix,black)
    pix = getPixel(titlePic,1,y)
    setColor(pix,black)
    pix = getPixel(titlePic,w-2,y)
    setColor(pix,black)
    pix = getPixel(titlePic,w-1,y)
    setColor(pix,black)

def drawBorder(firstPic):
  w = getWidth(firstPic)
  h = getHeight(firstPic)
  for x in range(0,w):
    pix = getPixel(firstPic,x,0)
    setColor(pix,black)
    pix = getPixel(firstPic,x,1)
    setColor(pix,black)
    pix = getPixel(firstPic,x,h-1)
    setColor(pix,black)
    pix = getPixel(firstPic,x,h-2)
    setColor(pix,black)
  for y in range(0,h):
    pix = getPixel(firstPic,0,y)
    setColor(pix,black)
    pix = getPixel(firstPic,1,y)
    setColor(pix,black)
    pix = getPixel(firstPic,w-2,y)
    setColor(pix,black)
    pix = getPixel(firstPic,w-1,y)
    setColor(pix,black)

def drawBorder(secondPic):
  w = getWidth(secondPic)
  h = getHeight(secondPic)
  for x in range(0,w):
    pix = getPixel(secondPic,x,0)
    setColor(pix,black)
    pix = getPixel(secondPic,x,1)
    setColor(pix,black)
    pix = getPixel(secondPic,x,h-1)
    setColor(pix,black)
    pix = getPixel(secondPic,x,h-2)
    setColor(pix,black)
  for y in range(0,h):
    pix = getPixel(secondPic,0,y)
    setColor(pix,black)
    pix = getPixel(secondPic,1,y)
    setColor(pix,black)
    pix = getPixel(secondPic,w-2,y)
    setColor(pix,black)
    pix = getPixel(secondPic,w-1,y)
    setColor(pix,black)

def drawBorder(thirdPic):
  w = getWidth(thirdPic)
  h = getHeight(thirdPic)
  for x in range(0,w):
    pix = getPixel(thirdPic,x,0)
    setColor(pix,black)
    pix = getPixel(thirdPic,x,1)
    setColor(pix,black)
    pix = getPixel(thirdPic,x,h-1)
    setColor(pix,black)
    pix = getPixel(thirdPic,x,h-2)
    setColor(pix,black)
  for y in range(0,h):
    pix = getPixel(thirdPic,0,y)
    setColor(pix,black)
    pix = getPixel(thirdPic,1,y)
    setColor(pix,black)
    pix = getPixel(thirdPic,w-2,y)
    setColor(pix,black)
    pix = getPixel(thirdPic,w-1,y)
    setColor(pix,black)

def drawBorder(fourthPic):
  w = getWidth(fourthPic)
  h = getHeight(fourthPic)
  for x in range(0,w):
    pix = getPixel(fourthPic,x,0)
    setColor(pix,black)
    pix = getPixel(fourthPic,x,1)
    setColor(pix,black)
    pix = getPixel(fourthPic,x,h-1)
    setColor(pix,black)
    pix = getPixel(fourthPic,x,h-2)
    setColor(pix,black)
  for y in range(0,h):
    pix = getPixel(fourthPic,0,y)
    setColor(pix,black)
    pix = getPixel(fourthPic,1,y)
    setColor(pix,black)
    pix = getPixel(fourthPic,w-2,y)
    setColor(pix,black)
    pix = getPixel(fourthPic,w-1,y)
    setColor(pix,black)

canvas=makeEmptyPicture((getWidth(titlePic)+getWidth(firstPic)+getWidth(secondPi
c)+getWidth(t
hirdPic)+getWidth(fourthPic)),getHeight(firstPic),lightGray)

def layoutComic():
  targetX=0
  for sourceX in range(0,getWidth(titlePic)):
    targetY=getHeight(canvas)-getHeight(titlePic)-30
    for sourceY in range(0,getHeight(titlePic)):
      px=getPixel(titlePic,sourceX,sourceY)
      cx=getPixel(canvas,targetX,targetY)
      setColor(cx,getColor(px))
      targetY=targetY+1
    targetX=targetX+1
  targetX=getWidth(titlePic)
  for sourceX in range(0,getWidth(firstPic)):
    targetY=getHeight(canvas)-getHeight(firstPic)
    for sourceY in range(0,getHeight(firstPic)):
      px=getPixel(firstPic,sourceX,sourceY)
      cx=getPixel(canvas,targetX,targetY)
      setColor(cx,getColor(px))
      targetY=targetY+1
    targetX=targetX+1
  targetX=(getWidth(titlePic)+getWidth(firstPic))
  for sourceX in range(0,getWidth(secondPic)):
    targetY=getHeight(canvas)-getHeight(secondPic)
    for sourceY in range(0,getHeight(secondPic)):
      px=getPixel(secondPic,sourceX,sourceY)
      cx=getPixel(canvas,targetX,targetY)
      setColor(cx,getColor(px))
      targetY=targetY+1
    targetX=targetX+1
  targetX=(getWidth(titlePic)+getWidth(firstPic)+getWidth(secondPic))
  for sourceX in range(0,getWidth(thirdPic)):
    targetY=getHeight(canvas)-getHeight(thirdPic)
    for sourceY in range(0,getHeight(thirdPic)):
      px=getPixel(thirdPic,sourceX,sourceY)
      cx=getPixel(canvas,targetX,targetY)
      setColor(cx,getColor(px))
      targetY=targetY+1
    targetX=targetX+1
  targetX=(getWidth(titlePic)+getWidth(firstPic)+getWidth(secondPic)+getWidth(thirdPic))
  for sourceX in range(0,getWidth(fourthPic)):
    targetY=getHeight(canvas)-getHeight(fourthPic)
    for sourceY in range(0,getHeight(fourthPic)):
      px=getPixel(fourthPic,sourceX,sourceY)
      cx=getPixel(canvas,targetX,targetY)
      setColor(cx,getColor(px))
      targetY=targetY+1
    targetX=targetX+1  
  show(canvas)
  return(canvas)

def saveComic():
  writePictureTo(canvas,"brill3.jpg")

Original issue reported on code.google.com by [email protected] on 14 Apr 2010 at 6:39

Reset button for interaction pane

We should have a reset button like Dr Java has to reset the interactions
pane to clear out definitions.  When people spend lots of time in JES, they
end up with old definitions that they forget about which causes problems.

Original issue reported on code.google.com by [email protected] on 5 Aug 2009 at 2:18

writeAVI broken

Fix this possibly by moving towards JavaFX and it's built in facilities for
writing avis and quicktime movies.

Original issue reported on code.google.com by [email protected] on 20 May 2009 at 3:52

Premature rounding with turtles

What steps will reproduce the problem?
1. turtle = makeTurtle(makeWorld())
2. turn(turtle, 70)
3. forward(turtle, 1)

What is the expected output? What do you see instead?

  The turtle position remains unchanged.  It should have moved by a fractional amount, so that the net effect of several small movements is visible.

What version of the product are you using? On what operating system?

  v4.3, MacOS

Please provide any additional information below.

  You are storing the turtle position as an integer, rather than a double.  As a result, it's not possible to create many interesting fractal shapes using your turtle.  Converting to integer screen coordinates should just be a final step in drawing the position.

Original issue reported on code.google.com by [email protected] on 11 Jun 2010 at 6:20

Migrate media code towards JavaFX

Ideally we'd like to move code away from the java media framework to use
the new JavaFX facilities to solve compatibility bugs.  Barb has more
information on this.

Original issue reported on code.google.com by [email protected] on 20 May 2009 at 3:53

writePictureTo() doesn't work in Windows Vista or 7 when there is a '.' in the file path.

What steps will reproduce the problem?
1. Create a folder anywhere on your computer called Test.Folder (I did this on 
the C drive just for simplicity)
2. Try to writePictureTo(somePicObject, "C:\\Test.Folder\\mypic.jpg")
3. A file will be written to the Test.Folder directory, but it will be 0KB and 
cannot be opened (just an empty file with a name...no picture data).  
4. Note that I can makePictures from files that are in Test.Folder.

What is the expected output? What do you see instead?
I see an "empty" file with no picture information.


What version of the product are you using? On what operating system?

Currently Windows 7.  Had the same problem with Windows Vista. 

Please provide any additional information below.

We plan on using this in the Intro to Computing and Information Technology here 
at the Academy, but many of our user names are first.last so this has become a 
big issue.

Thanks!

Original issue reported on code.google.com by [email protected] on 23 Aug 2011 at 10:26

The error java.lang.NullPointerException has occured

What steps will reproduce the problem?
1. Anytime I run the code
2.
3.

What is the expected output? What do you see instead? The program will run, 
producing an integer.


What version of the product are you using? On what operating system?
Windows 7, 4-2-1


Please provide any additional information below.
Here is the error: The error java.lang.NullPointerException has occured

Original issue reported on code.google.com by [email protected] on 29 Oct 2010 at 3:43

Attachments:

4.2b beta Builds broken on Mac

The DMG of 4.2b does not load properly on any mac.  We solved this during
workshops by having people just use the windows version and run using linux
instructions.

Also, our builds were requiring JRE 1.6+, but we don't need to do that, and
shouldn't because older macs can not get Java 6.  We need to build the 4.2
final releases targetting 1.5 JRE.

Original issue reported on code.google.com by [email protected] on 5 Aug 2009 at 2:14

FrameSequencerTool bugs

What steps will reproduce the problem?
1. openFrameSequencerTool(makeMovie())

The tool opens, but the "Add image" and "Change Frames Per Second" buttons
do not work.

Original issue reported on code.google.com by [email protected] on 6 Aug 2009 at 7:09

JES.exe sometimes doesn't work

The executable doesn't always work on Windows machines, but the bat file
works fine.  We encountered this in a couple places at the workshop, but
not it's not clear what the cause is.

Original issue reported on code.google.com by [email protected] on 5 Aug 2009 at 2:15

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.