The (JES)Jython Environment for Students is a full-featured media computation environment for programming in Jython. It includes facilities for programming, debugging, and media examination. JES also comes with an extensive multimedia API, enabling easy and rapid manipulations of sounds, images, and on some platforms, video.
Questions tagged [jes]
177 questions
18
votes
2 answers
Manual mocking using __mocks__ not working
I'm trying to add some tests to the node application I'm developing. I went through jest documentation for manual mocking and tried creating mocks folder as instructed. Please find the folder structure below.
app
- firebase
- fb.js
- __mocks__
…

Suneeth Lenin
- 285
- 1
- 4
- 10
10
votes
3 answers
How to count the number of pixels of a certain color in python?
I have a picture of two colours, black and red, and I need to be able to count how many pixels in the picture are red and how many are black.

milkysheep
- 101
- 1
- 1
- 3
6
votes
1 answer
Jython image manipulation
This program is supposed to take the outline of an image, then split it into different quadrants, then color it, such as the Andy Warhol Marilyn Monroe picture.
Every function up to the "Warholize" function works but it gets stuck on…

roger34
- 275
- 2
- 6
- 16
6
votes
4 answers
Fading a picture gradually
The idea of this function is to fade the top half only of the picture (make it gradually darker). Here is what I have but it seems to be making all of the top half solid black.
def fadeDownFromBlack(pic1):
w=getWidth(pic1)
h=getHeight(pic1)
for y…

roger34
- 275
- 2
- 6
- 16
6
votes
4 answers
Drawing Diagonal Lines Across a Picture
I am trying to draw parallel lines diagonally from the top right corner to the bottom left corner of a picture. I want it to look like this (lovely paint pic)
def diagTopLBottomR():
pic=makePicture(pickAFile())
w=getWidth(pic)
…
user3956566
4
votes
4 answers
Flipping Image Python
I am trying to flip an image horizontally.
From this:
To This:
But I keep getting it mirrored half way.
Like This:
I am trying to reverse the x-axis index and I don't understand why it is being divided.
def…
user3956566
3
votes
1 answer
Jest has detected the following 2 open handles potentially keeping Jest from exiting:
I am new to testing. I am using JEST to test my nodejs API's. When i am writing all the tests in one file its running properly without any error but when i am separating it its giving me port is already under use As for each file its running…

Cycl0n3
- 611
- 1
- 6
- 25
3
votes
0 answers
Green screen effect in Python?
Basically, I just need to erase the green screen pixels in one of the images, then overlap it on the background image. Both images are of the same size.
pic1 = "C:\Users\user\Desktop\greenscreen.png"
pic2 =…
user10402587
3
votes
4 answers
swap function output is different from what expected
I think the output should be x = 5, y = 3. But, when I tried executing it in jes it shows that x=3 and y=5.
My swap function is as follows:
def swap (x,y):
temp=x
x=y
y=temp
And from my driver function I call swap():
def driver(): …

Amiya
- 39
- 3
3
votes
4 answers
Jython convert picture to grayscale and then negate it
Please bear with me, I've only started python a few weeks ago.
I am using JES.
I have made a function to convert a picture to grayscale. I created two names for each color r and r1, g and g1, b and b1. The idea behind this, was to keep the original…
user3956566
3
votes
2 answers
Flip horizontally an image in Python (JES)
I need to make a function that will copy an image, but mirrored. I created the code to mirror the image, but it isn't working and I don't know why because I traced the code and it should be mirroring the image. Here's the code:
def invert(picture):
…

user2387191
- 65
- 1
- 4
- 9
3
votes
4 answers
Mirror Image Diagonally in Python
I'm taking a programming class on python, and we're working on mirroring images by defining a mirror point and then copying a pixel from one side to the other using nested for loops. For example, mirroring an image vertically would use the following…

user2054546
- 31
- 1
- 1
- 2
3
votes
2 answers
Jython/Python - Flipping a picture horizontally
I'm trying to "cut" a picture in half and flip both sides horizontally. See link below.
https://i.stack.imgur.com/mg9Qg.jpg
Original picture:
What the output needs to be:
What I'm getting
This is what I have, but all it does is flip the picture…

John Calzone
- 41
- 2
- 5
2
votes
1 answer
How to write a range so that one of the values is left open to user input
I would like to write a function for range where you enter a value when you are calling the function.
def randomRange():
for num in range(0, ())
print num
I would like the user to call the function like this "randomizeRange()"
And then…

JenTen10
- 123
- 1
- 2
- 9
2
votes
0 answers
How to create a collage of pictures in JES?
I've been trying to create a collage of images in JES but when I call createCopy2(), they pop up separately and only one has gone through the change I've told it to(the pic that turns into sepia colored). How do I get them to come up on the same…

Hat
- 81
- 10