I'm having a problem to convert an array to a array list.
When I use:
" listOfFiles = new ArrayList<File>(Arrays.asList(Folder.listFiles())); "
It keep showing: "Cannot find anything named "Array"", wich makes me think that Processing don't have any Arrays class, as in Java:
(
http://stackoverflow.com/questions/157944/how-to-create-arraylist-arraylistt-from-array-t)
Btw, listOfFiles = Folder.listFiles().asList(); also give me that error message "Cannot invoke asList() on the array type File[]"
Well, I'm trying to use pdfbox to create a image trough a pdf file.
There only a few codes of this on the web and almost all of then have some problems, so I can't have a good reference.
Here's is my code:
//lots of import
void setup() {
size(200, 200);
}
void draw()
{
PDDocument pdf = null;
pdf = PDDocument.load(new File("C:\\Users\\Pedrog\\Documents\\Processing\\pdfConvert\\testing.pdf"));
PDFImageWriter imageWriter = new PDFImageWriter();
imageWriter.writeImage(pdf, "png", "", 1, 10, "imagemPdf");
}
But I keep reciving IOException on load function, I checked the library reference and they say that happens when:
"If there is an error reading from the stream.". (
http://pdfbox.apache.org/apidocs/org/apache/pdfbox/pdmodel/PDDocument.html#load%28java.io.File%29) I've already checked the path, the file name and executed processing as admin but nothing helped me.
Can someone give me any ideas?
Hi,
I was thinking to do some kind of a multiple RSS Feed Window using processing. At this project I need open pdf, images(jpeg,maybe gif), websites and then display them on a divided window.
Something like this:
I was thinking to convert the pdf files to any kind of image using:
http://pdfbox.apache.org/ But I had no ideas for the Web RSS Feed.
Is this viable using processing?
Hi everybody,
I'm developing a plataform game such as mario. For this, I've been using pBox2d and all the fisics are almost done, so I began to create all the sprites/animations. But at the moment, my real problem is how to properly treat images to use then as sprites/background.
First I tryed to use background fuction to load my background, but the image that've created for it was bigger than the screen, so I failed. After this I used loadImage before I draw any sprites, but it make my game start "laging" and too slow.
Then I thought if I could "cut" the background image, set as background and when my character moves I cut it again and set as Background? But I didn't find any library to do that :/.
Can someone help or tell how properly do that?
Hi :)
I'm trying to create a game such as mario, sonic, etc with Processing + pBox2d.
I'm still having some problems with the camera :/ (it should follow the character but I don't know why it only sets the ground/plataform), but i'm working on it.
Here's the github:
https://github.com/Pedroglp/jogoDev A,W,S,D - Move the character.
R - Reset (it's bugged, but i'll solve it when as soon as the camera problem it's solved).
Other problem it's "keep moving" after jumping, I didn't find any other affective way to clean the pressed key without doing something like "key='^' " and I think that's why I need to press twice A,D keys after jumping to move.
By the way, all the comments and some variables in the code are written in portuguese, so be free to ask any question about it.
Thank you for the attention and sorry about my poor english :/