We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hi,
I am new to processing and looking for help / code examples turning an image into ASCII text via processing. I started using ASCII video by Ben Fry using my webcam generating ASCII images. This works fine :) Now I'm looking for a method using a picture (.jpg for example) as source instead of the live picture from my webcam. I already used search in this forum but I wasn't able to find a solution or code example for my issue. Maybe someone can help me with code examples or how I could modify Ben Fry's ASCII video for my needs.
regards CP1
Answers
You can just reuse this sketch, but instead of using the camera capture (which is a simple PImage), you can use the PImage produced by a loadImage().
Note: avoid using backquote ` as apostrophe, it has a special meaning in this forum (displaying monospaced text), beside being incorrect in typography.
Here's a simplified example that should suit your needs:
When you create your sketch, create a folder within the sketch folder called "data" and drop your image file in there. I just used the stock "Penguins.jpg" image from my Windows installation. You can add a few more characters and change the sampling resolution to your liking, but the basic idea is all there.