# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?page=46

[Latest](https://discourse.processing.org/latest.md) · [Categories](https://discourse.processing.org/categories.md) · [Tags](https://discourse.processing.org/tags.md)

**Page:** 47

---

## [Help with code with images](https://discourse.processing.org/t/help-with-code-with-images/40917)

<div class="topic-metadata">

**Author:** [@ajaynischal98](https://discourse.processing.org/u/ajaynischal98)\
**Replies:** 3\
**Last updated:** [February 23, 2023, 6:22pm UTC](https://discourse.processing.org/t/help-with-code-with-images/40917 "2023-02-23T18:22:57Z")

</div>

ArrayList\<PImage\> images; int lastImageIndex = -1; int nextImageIndex = 0; float alphaValue = 0; float alphaShift = 0.004; // adjust speed, smaller = slower //Parabolic Zoom void setup() { fullScreen(P2…

---

## [Mapping a video texture on PShape](https://discourse.processing.org/t/mapping-a-video-texture-on-pshape/41014)

<div class="topic-metadata">

**Author:** [@animalfrommars](https://discourse.processing.org/u/animalfrommars)\
**Replies:** 4\
**Last updated:** [February 23, 2023, 4:35pm UTC](https://discourse.processing.org/t/mapping-a-video-texture-on-pshape/41014 "2023-02-23T16:35:13Z")

</div>

Hello, I’m trying to map a video image from a webcam on a PShape. It seems that colors are changing but the video image don’t appear… See my code below. Thank you for your help. import processing.video.\*; import pro…

---

## [Image() flickers when changing sketch size with windowResize()](https://discourse.processing.org/t/image-flickers-when-changing-sketch-size-with-windowresize/38952)

<div class="topic-metadata">

**Author:** [@sableraph](https://discourse.processing.org/u/sableraph)\
**Replies:** 4\
**Last updated:** [February 23, 2023, 3:44pm UTC](https://discourse.processing.org/t/image-flickers-when-changing-sketch-size-with-windowresize/38952 "2023-02-23T15:44:18Z")

</div>

Context: I’m trying to make a demo sketch for the new window methods in Processing 4.0 (which replace the old surface methods). I’m running in an issue where the image flickers at larger sizes.This happens even if I art…

---

## [How to set an area of pixels in an if statement?](https://discourse.processing.org/t/how-to-set-an-area-of-pixels-in-an-if-statement/41006)

<div class="topic-metadata">

**Author:** [@MaxU89](https://discourse.processing.org/u/MaxU89)\
**Replies:** 3\
**Last updated:** [February 23, 2023, 8:45am UTC](https://discourse.processing.org/t/how-to-set-an-area-of-pixels-in-an-if-statement/41006 "2023-02-23T08:45:15Z")

</div>

Hello. I need help with setting an area of pixels in an if statement. I am still kind of new here so please don’t pay attention to any wrong terminology I use. In an if statement I need to use not only the one position …

---

## [Use Vim commands in the Processing Development Environment (PDE)?](https://discourse.processing.org/t/use-vim-commands-in-the-processing-development-environment-pde/41000)

<div class="topic-metadata">

**Author:** [@DougT](https://discourse.processing.org/u/DougT)\
**Replies:** 1\
**Last updated:** [February 22, 2023, 11:27pm UTC](https://discourse.processing.org/t/use-vim-commands-in-the-processing-development-environment-pde/41000 "2023-02-22T23:27:43Z")

</div>

I would like to use vim commands (and perhaps syntax highlighting) in the PDE editor. I searched the documentation, but didn’t find much. If this is possible, please provide detailed instructions (or a reference). Tha…

---

## [Logging strategies](https://discourse.processing.org/t/logging-strategies/39108)

<div class="topic-metadata">

**Author:** [@renaudfv](https://discourse.processing.org/u/renaudfv)\
**Replies:** 2\
**Last updated:** [February 22, 2023, 3:10pm UTC](https://discourse.processing.org/t/logging-strategies/39108 "2023-02-22T15:10:58Z")

</div>

Hi everyone! I was exploring logging strategies for projects that need to run all the time. It mainly comes out of a need to find if any errors are thrown by Processing/PApplet. Here’s a gist/snippet of what I came up …

---

## [Binary Search algorithm](https://discourse.processing.org/t/binary-search-algorithm/40996)

<div class="topic-metadata">

**Author:** [@neon124](https://discourse.processing.org/u/neon124)\
**Replies:** 1\
**Last updated:** [February 22, 2023, 2:30pm UTC](https://discourse.processing.org/t/binary-search-algorithm/40996 "2023-02-22T14:30:38Z")

</div>

To find a record, I’m using binary search. My question is not about whether or not the data is present. My questions are listed here. if data are in following order 1 2 3 4 4 5 5 5 6 7 8 8 9 10 11 If I look for 5 whe…

---

## [Function within mousePressed function doesn't work](https://discourse.processing.org/t/function-within-mousepressed-function-doesnt-work/40981)

<div class="topic-metadata">

**Author:** [@MaxU89](https://discourse.processing.org/u/MaxU89)\
**Replies:** 3\
**Last updated:** [February 21, 2023, 8:55pm UTC](https://discourse.processing.org/t/function-within-mousepressed-function-doesnt-work/40981 "2023-02-21T20:55:50Z")

</div>

Hello. I am still kind of new to processing. I have been trying to create a game with moving platform(I called it plank), balls which shoot down bricks. I am currently creating the platform and I want it to move on the x…

---

## [Navigation links in PDF](https://discourse.processing.org/t/navigation-links-in-pdf/40973)

<div class="topic-metadata">

**Author:** [@Mattax\_ger](https://discourse.processing.org/u/Mattax_ger)\
**Replies:** 3\
**Last updated:** [February 21, 2023, 5:06pm UTC](https://discourse.processing.org/t/navigation-links-in-pdf/40973 "2023-02-21T17:06:37Z")

</div>

Hello everyone, i am using processing since 2015 and just registered for the forum. i would like to know if you guys can tell me how to put a page/chapter hypertext-link inside a generated pdf file, if this is even pos…

---

## [Illegal modifier for the local class player; only abstract or final is permitted](https://discourse.processing.org/t/illegal-modifier-for-the-local-class-player-only-abstract-or-final-is-permitted/40970)

<div class="topic-metadata">

**Author:** [@shoux2](https://discourse.processing.org/u/shoux2)\
**Replies:** 4\
**Last updated:** [February 21, 2023, 10:22am UTC](https://discourse.processing.org/t/illegal-modifier-for-the-local-class-player-only-abstract-or-final-is-permitted/40970 "2023-02-21T10:22:32Z")

</div>

void player() { public class player { private int dx; private int dy; private int x = 40; private int y = 60; private int w; private int h; private Image image; public player() { …

---

## [How do you import a class](https://discourse.processing.org/t/how-do-you-import-a-class/40971)

<div class="topic-metadata">

**Author:** [@shoux2](https://discourse.processing.org/u/shoux2)\
**Replies:** 3\
**Last updated:** [February 21, 2023, 10:53am UTC](https://discourse.processing.org/t/how-do-you-import-a-class/40971 "2023-02-21T10:53:15Z")

</div>

Main import java.awt.Image; import java.awt.event.KeyEvent; import javax.swing.ImageIcon; PImage gawd; PImage god; PImage lt33; void setup() { size(500, 500); background(50); scene1(); gawd = loadImage("gawd.p…

---

## [Character ArrayList (with small Editor for one line of text)](https://discourse.processing.org/t/character-arraylist-with-small-editor-for-one-line-of-text/40967)

<div class="topic-metadata">

**Author:** [@nanto2016](https://discourse.processing.org/u/nanto2016)\
**Replies:** 2\
**Last updated:** [February 20, 2023, 9:52pm UTC](https://discourse.processing.org/t/character-arraylist-with-small-editor-for-one-line-of-text/40967 "2023-02-20T21:52:07Z")

</div>

I want to create an ArrayList of chars, how would I do this? ArrayList\<char\> a = new ArrayList\<char\>(); doesn’t work. Same for all primitive types, but int and some others have their own list datatypes. so I could use a…

---

## [Random Select Images and Fade in / fade out according to variable / Blend](https://discourse.processing.org/t/random-select-images-and-fade-in-fade-out-according-to-variable-blend/40960)

<div class="topic-metadata">

**Author:** [@JonnieNightTime](https://discourse.processing.org/u/JonnieNightTime)\
**Replies:** 1\
**Last updated:** [February 20, 2023, 9:12am UTC](https://discourse.processing.org/t/random-select-images-and-fade-in-fade-out-according-to-variable-blend/40960 "2023-02-20T09:12:21Z")

</div>

Hi All, can’t see the wood for the trees here!! I"m trying to randomly move through an image directory, and fade in and out according to a variable imgA\_Duration. Eventually I want to blend multiple layers of images fro…

---

## [New childs added to PShape after being displayed once won't show](https://discourse.processing.org/t/new-childs-added-to-pshape-after-being-displayed-once-wont-show/40963)

<div class="topic-metadata">

**Author:** [@sem](https://discourse.processing.org/u/sem)\
**Replies:** 1\
**Last updated:** [February 19, 2023, 7:02pm UTC](https://discourse.processing.org/t/new-childs-added-to-pshape-after-being-displayed-once-wont-show/40963 "2023-02-19T19:02:45Z")

</div>

Hello, in my sketch i continuesly add PShape childs to a group, but once i draw the group the newly added childs wont show up anymore, does anyone have a solution for this, or a workaround. I’d be very much appreciated. …

---

## [Simplist way to have a high score server across multiple locations?](https://discourse.processing.org/t/simplist-way-to-have-a-high-score-server-across-multiple-locations/40957)

<div class="topic-metadata">

**Author:** [@EliTheIceMan](https://discourse.processing.org/u/EliTheIceMan)\
**Replies:** 2\
**Last updated:** [February 19, 2023, 11:52am UTC](https://discourse.processing.org/t/simplist-way-to-have-a-high-score-server-across-multiple-locations/40957 "2023-02-19T11:52:43Z")

</div>

I feel I am pretty competent with Processing (java) but have no experience with servers and the like. What would be the best/easiest way to implement a “server/broker” that could allow multiple instances of a sketch sim…

---

## [Video library for Processing not found](https://discourse.processing.org/t/video-library-for-processing-not-found/40956)

<div class="topic-metadata">

**Author:** [@Kylle](https://discourse.processing.org/u/Kylle)\
**Replies:** 2\
**Last updated:** [February 18, 2023, 1:20pm UTC](https://discourse.processing.org/t/video-library-for-processing-not-found/40956 "2023-02-18T13:20:15Z")

</div>

I just tried the suggestion from Processing to get access to the webcam: However, the program does not recognize: import processing.video.\*; And I can not find the Library anywhere. Error message: The package proces…

---

## [Changing Stroke and Fill of a PShape in realtime](https://discourse.processing.org/t/changing-stroke-and-fill-of-a-pshape-in-realtime/40944)

<div class="topic-metadata">

**Author:** [@animalfrommars](https://discourse.processing.org/u/animalfrommars)\
**Replies:** 5\
**Last updated:** [February 16, 2023, 9:42pm UTC](https://discourse.processing.org/t/changing-stroke-and-fill-of-a-pshape-in-realtime/40944 "2023-02-16T21:42:28Z")

</div>

Hello, Could any one explain me how to change the Stroke and the Fill of a PShape in realtime ? See the code below. Thank you very much for your help. PShape D; void setup() { size(400, 400, P3D); D = createShape…

---

## [Create class in Processing (error message)](https://discourse.processing.org/t/create-class-in-processing-error-message/40922)

<div class="topic-metadata">

**Author:** [@kmll](https://discourse.processing.org/u/kmll)\
**Replies:** 7\
**Last updated:** [February 16, 2023, 11:53am UTC](https://discourse.processing.org/t/create-class-in-processing-error-message/40922 "2023-02-16T11:53:47Z")

</div>

I created a class in a separate TAB but I still get the “The class Test does not exist”. If I move the class code into the main tab it works fine. What do I need to do to import the class? In main tab: Test t1 = new Te…

---

## [Why Processing still only supports float precision coordinates?](https://discourse.processing.org/t/why-processing-still-only-supports-float-precision-coordinates/40948)

<div class="topic-metadata">

**Author:** [@istinn](https://discourse.processing.org/u/istinn)\
**Replies:** 2\
**Last updated:** [February 16, 2023, 12:44am UTC](https://discourse.processing.org/t/why-processing-still-only-supports-float-precision-coordinates/40948 "2023-02-16T00:44:22Z")

</div>

Why processing still only supports float precision coordinates? Is there an obvious reason why not to support double data type alongside with float? If there was a reason back in the early days, this was hardware specs, …

---

## [OpenCV facial expressions mapping](https://discourse.processing.org/t/opencv-facial-expressions-mapping/21133)

<div class="topic-metadata">

**Author:** [@rkk16](https://discourse.processing.org/u/rkk16)\
**Replies:** 2\
**Last updated:** [February 15, 2023, 11:04pm UTC](https://discourse.processing.org/t/opencv-facial-expressions-mapping/21133 "2023-02-15T23:04:00Z")

</div>

What would be the best way to detect facial expressions from a live video on processing and map the different expressions into values?

---

## [Transitions for Fading and Zooming](https://discourse.processing.org/t/transitions-for-fading-and-zooming/40927)

<div class="topic-metadata">

**Author:** [@ajaynischal1](https://discourse.processing.org/u/ajaynischal1)\
**Replies:** 1\
**Last updated:** [February 15, 2023, 5:57pm UTC](https://discourse.processing.org/t/transitions-for-fading-and-zooming/40927 "2023-02-15T17:57:54Z")

</div>

ArrayList\<PImage\> images; int lastImageIndex = -1; int nextImageIndex = 0; float alphaValue = 0; float alphaShift = 0.004; // adjust speed, smaller = slower //Parabolic Zoom void setup() { fullScreen(P2…

---

## [Library for Processing](https://discourse.processing.org/t/library-for-processing/40901)

<div class="topic-metadata">

**Author:** [@OverLord](https://discourse.processing.org/u/OverLord)\
**Replies:** 4\
**Last updated:** [February 15, 2023, 5:08pm UTC](https://discourse.processing.org/t/library-for-processing/40901 "2023-02-15T17:08:44Z")

</div>

Is it possible to create a library for Processing on Processing? If yes: What knowledge do I need to make a library for Processing.

---

## [Why the exported to desktop (.exe) Processing app with Java classes can not work run properly?](https://discourse.processing.org/t/why-the-exported-to-desktop-exe-processing-app-with-java-classes-can-not-work-run-properly/40933)

<div class="topic-metadata">

**Author:** [@MGDSStudio](https://discourse.processing.org/u/MGDSStudio)\
**Replies:** 2\
**Last updated:** [February 15, 2023, 3:22pm UTC](https://discourse.processing.org/t/why-the-exported-to-desktop-exe-processing-app-with-java-classes-can-not-work-run-properly/40933 "2023-02-15T15:22:50Z")

</div>

I try to export my processing app as the “ready to use” application with exe launch file for desktop. My code is pretty simple. Proccessing code: private io.itch.mgdsstudio.airfight.connecteddevices.Controller controlle…

---

## [How can I send a .wav file from a Processing client to a Python server?](https://discourse.processing.org/t/how-can-i-send-a-wav-file-from-a-processing-client-to-a-python-server/40913)

<div class="topic-metadata">

**Author:** [@Alessandro199762](https://discourse.processing.org/u/Alessandro199762)\
**Replies:** 0\
**Last updated:** [February 13, 2023, 2:59pm UTC](https://discourse.processing.org/t/how-can-i-send-a-wav-file-from-a-processing-client-to-a-python-server/40913 "2023-02-13T14:59:45Z")

</div>

Hello. As stated in the header, i need to send a file .wav (but i think any method is suitable for any file) from a processing client to a python server which processes the file and sends it back to the processing clien…

---

## [Advice for understanding Processing 'under the hood'](https://discourse.processing.org/t/advice-for-understanding-processing-under-the-hood/40778)

<div class="topic-metadata">

**Author:** [@MuddyGardener](https://discourse.processing.org/u/MuddyGardener)\
**Replies:** 11\
**Last updated:** [February 15, 2023, 1:33am UTC](https://discourse.processing.org/t/advice-for-understanding-processing-under-the-hood/40778 "2023-02-15T01:33:25Z")

</div>

Sometimes I run into something about Processing that I think is super useful but isn’t obvious from the surface level documentation, such as this answer to a query from the old Processing forum: the PGraphics object us…

---

## [Quiz with sounds and navigation bar (loading sounds)](https://discourse.processing.org/t/quiz-with-sounds-and-navigation-bar-loading-sounds/40923)

<div class="topic-metadata">

**Author:** [@iinnessic](https://discourse.processing.org/u/iinnessic)\
**Replies:** 2\
**Last updated:** [February 14, 2023, 9:01pm UTC](https://discourse.processing.org/t/quiz-with-sounds-and-navigation-bar-loading-sounds/40923 "2023-02-14T21:01:23Z")

</div>

Hi! So I have this Quiz about a solar cell I need to program. I have a few minor problems, but what really stresses me out right now, is that my code does not work when I import too many sounds… What can I do? These are…

---

## [Problems downloading and running first time in Windows 11](https://discourse.processing.org/t/problems-downloading-and-running-first-time-in-windows-11/40915)

<div class="topic-metadata">

**Author:** [@lmtanco](https://discourse.processing.org/u/lmtanco)\
**Replies:** 0\
**Last updated:** [February 13, 2023, 6:21pm UTC](https://discourse.processing.org/t/problems-downloading-and-running-first-time-in-windows-11/40915 "2023-02-13T18:21:02Z")

</div>

Hi there, I upgraded my Windows 10 to Windows 11, then immediately installed Processing 4.3.1 for Windows. Windows 11 did not let me even download it (i had to turn off Antivirus). Once I managed to prevent Windows fr…

---

## [Possible to use a variable as literal code? (from variables to ArrayList)](https://discourse.processing.org/t/possible-to-use-a-variable-as-literal-code-from-variables-to-arraylist/40903)

<div class="topic-metadata">

**Author:** [@Aryszin](https://discourse.processing.org/u/Aryszin)\
**Replies:** 6\
**Last updated:** [February 12, 2023, 9:27pm UTC](https://discourse.processing.org/t/possible-to-use-a-variable-as-literal-code-from-variables-to-arraylist/40903 "2023-02-12T21:27:48Z")

</div>

so this is very complicated. im making an art software and i have many pgraphics, and i need to speak to the pgraphics. im wondering if there is any method, i could make it so it doest always is: if(currentlayer == 1) {…

---

## [Where do I get OpenGL filters?](https://discourse.processing.org/t/where-do-i-get-opengl-filters/40907)

<div class="topic-metadata">

**Author:** [@Aryszin](https://discourse.processing.org/u/Aryszin)\
**Replies:** 1\
**Last updated:** [February 12, 2023, 9:20pm UTC](https://discourse.processing.org/t/where-do-i-get-opengl-filters/40907 "2023-02-12T21:20:01Z")

</div>

Is there a site where i can download .glsl filter? Ty

---

## [Saving Sketch to PDF Issues](https://discourse.processing.org/t/saving-sketch-to-pdf-issues/40909)

<div class="topic-metadata">

**Author:** [@butterfield8](https://discourse.processing.org/u/butterfield8)\
**Replies:** 0\
**Last updated:** [February 12, 2023, 11:55pm UTC](https://discourse.processing.org/t/saving-sketch-to-pdf-issues/40909 "2023-02-12T23:55:41Z")

</div>

Hello- I am trying to save my sketch to a pdf. When I follow the documentation exactly with a simple geometry, it works fine. However, I have a function that grabs a random shape and puts it on the screen in a loop. Whe…

[Previous page](https://discourse.processing.org/c/processing/6.md?page=45)

[Next page](https://discourse.processing.org/c/processing/6.md?page=47)
