I was just wondering, whether there is a comfortable and straightforward way to select and copy from an image other shapes than a rectangle. More specifically I'd like to select and copy a circular area from an image.
I just wondered if it's possible to read PDF files with Processing via some extension or library I am not aware of. Anyone?
Thanks in advance,
Ben
UPDATE: yeah, I know that you can read the textual content of a PDF file, but I'm looking for something more, like reading whole pages as image or something.
I have a program that draws waveforms of sound files and I'd like to make it capable of saving the drawed waveforms below each other, thus creating a "picture" of the given song. A requirement is that it can do it quite fast, in a manner that would not make the program lag.
My problem is that the only solution that I can think of would be saving an image file, then reloading it, appending the new waveform, then saving it again at each loop, but this image file would grow unbearably large for Processing to handle as the song proceeds. Is there a good way to do this?
can someone please help me with developing a code wich basically removes all ID3 tags of an mp3 file located in the data folder?
I need this in order to work with minim, as it gets confused by mp3 files tagged with APIC, UFID etc tags... and that's not very nice, the sketch freezes if this happens. :(
I was wondering if it is possible to use any custom java library with processing, or they need to be modified somehow to work with processing?
Also, how to import them?
Actually, I downloaded
this library, (I want to remove ID3 tags from mp3 files), copied it into the libraries folder, tried to import it like this: import org.farng.mp3.*; but I got a "missing library" error. What to do, what do I do wrong?
I am struggling with realizing an idea and it drives mad already, so I was wondering if anyone could help me?
Basically I'd like to develop an algorithm that accesses array elements randomly, not like a for loop would. It seemed like a pretty easy and straightforward task first (choosing a random element, accessing the random element, then making a new array not containing the already accessed element, replacing the old array with the new one, then starting over) but my code just wont work and I truly don't see why...
Actually I traced down the problem to the fact that somehow the processed array ("oldArray") is not getting any shorter, though it should (since one element is omitted in each cycle by the "i!=which" condition, and it is truly omitted, I checked that also).
Thanks a lot in advance,
Ben
UPDATE:
In the meantime I figured that maybe I should just use ArrayList instead of arrays... But still, I cant wrap my head around why my code would not work, so if anyone has an idea please share!
does Processing have a built-in global variable (like screen.width etc...) containing the version of Windows the applet is currently running on in some form? Or is there some nice Javaish way to get that information?
I was wondering if there was a way to display accented characters properly when they are being loaded from a .txt file. If I try to print accented chars written in the code, they print just fine, but when they are being loaded from a .txt file, they wont show. Here's my sample code, it demonstrates the problem well:
size(screen.width,screen.height);
background(255);
fill(0);
textFont(createFont("Calibri",50),50);
textAlign(CENTER,CENTER);
String[] lines=loadStrings("lines.txt");
if(lines.length>0) {
text(lines[0],width/2,height/2);
}
else {
text("chars from code: ö, ü, ó, ú, ő, ű, á, é, í",width/2,height/2);
}
lines.txt contains this single line: "lines.txt: ö, ü, ó, ú, ő, ű, á, é, í"