Questions tagged [jes]

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.

177 questions
1
vote
1 answer

Saving changes to newPic when copying an image in jython

There are similar questions on Stack Overflow, but I cannot find what I am doing wrong in my code. def copyPic(): file=pickAFile() oldPic=makePicture(file) newPic=makeEmptyPicture(getWidth(oldPic),getHeight(oldPic)) for y in…
user3956566
1
vote
2 answers

Increasing image width by one pixel

I am trying to implement a program, that will increase the width of an image by one pixel. I then want to take the new maximum x ordinate and put this with a random y ordinate (that is within the range of the image) to create a new pixel. for x in…
user3956566
1
vote
1 answer

Error in Image Crop function in Jython

Okay, so for an assignment I have to make a function crop() that will crop a picture in test_crop(). Here's the code. def crop(pict, startX, startY, endX, endY): width = endX - startX + 1 height = endY - startY + 1 canvas =…
user2387191
  • 65
  • 1
  • 4
  • 9
1
vote
1 answer

White gridlines over image using JES (python)

How can I write a program using JES to draw “White” gridlines on an image where the horizontal gridlines are separated by 10 pixels and the vertical gridlines are separated by 20 pixels?
1
vote
1 answer

Crop Function Jython JES

Hi im trying to make a crop function in Jython Environment For Students heres what i have so far. I am also trying to figure out how to make the canvas the size that all the new pixels will take up. Any help def crop(pic, startX, endX, startY,…
user2194374
  • 123
  • 3
  • 4
  • 9
1
vote
2 answers

How to flip a picture diagonally

Like this https://i.stack.imgur.com/NinbE.jpg This is what I have but it's not working and I'm not sure why. def mirrorDiagonal(picture): for sourceX in range(0,getWidth(picture)): for sourceY in range (0,getHeight(picture)): …
John Calzone
  • 41
  • 2
  • 5
0
votes
0 answers

How to test FileReader onload in jest Angular?

I want to test FileReader onload Function in jest. I tried various code, but not working for me, can anyone help? The FileReader interface in the node_modules\typescript\lib\lib.dom.d.ts this is the library file. uploadFile(event) { let reader…
Felix
  • 1
  • 3
0
votes
0 answers

How to fix Jython error on line that does not exist

so I am relatively new to coding using JES (Jython) I wrote an 81 lines long code but when I run the program, it says your code contains at least one syntax error, meaning it is not legal Jython. Error on line 97 So line 97 does not even exist since…
Omar
  • 11
  • 3
0
votes
1 answer

how to test react native code with jest and mock for firebase

I am trying to test react native method using jest , my problem is the revised value is not the same as expected value . because the function use firebase i made mock so this is the method i want to use insertUserAction= async ()=>{ …
0
votes
1 answer

Unable to use pickAFile in TigerJython

In JES, I am able to use: file=pickAFile() In TigerJython, however, I get the following error NameError: name 'pickAFile' is not defined What am I doing wrong here?
Bassam
  • 41
  • 7
0
votes
1 answer

Convert int to binary in JES?

I'm trying to convert an int to a binary string. This would be super easy with the bin() function, but this is not available in JES, which uses Jython 2.5.2. I tried using this: def convertToBinary(n): string = '' if n > 1: …
Zac Perry
  • 101
0
votes
0 answers

How to select part of an image, then paste the selected part of the image in a checkerboard pattern into another image using JES?

I am using Jython, or JES, and I want to repeatedly copy, in a checkerboard pattern, part of one image into another image. I am wondering how that might be done? So far I have this: def checkerboard(pic): p = makeEmptyPicture(500,500) targetX =…
MC10
  • 1
  • 1
0
votes
2 answers

Truly a beginner, assigning the multiple values to one variable in Python

I want to make an image for any user, that's not specific to one size, I came up with this. I'm new at this, can anyone let me know why this does not work? blk = makeEmptyPicture(getWidth(pic)+30), getHeight(pic)+30), black)
Dash
  • 1
0
votes
1 answer

Unable to create hyperlink to new file created by user input

Hello running through a program for a Python / Jython class and running into an issue in the last portion. The code should prompt user for text 3 times and create a new hyperlink where the user can download the file with the text they entered. I…
OJC
  • 1
  • 1
0
votes
0 answers

Submit a mainframe job using FitNesse, C# & FTPClient=JES

Looking for a way to submit mainframe job using Framework FitNesse, C# & FTPClient "filetype=jes" Tried with framework FitNesse, JAVA & FTPClient "filetype=jes", its working fine.