How to export as a jpg

edited September 2016 in How To...

My students have produced some really cool image manipulations and some really cool original drawings in Processing. I would like to be able to make large posters of their work and hang them in my classroom, but I have no idea how to do this. I don't believe a screenshot will give me enough resolution. I noticed that you can save as a pdf in Processing but that saved the code portion, not the image. Any ideas?



  • A screenshot will give you the full resolution of the sketch. If you need it to be bigger, then that's a separate step from acquiring the image.

    But if taking a screenshot (or using some other kind of screen capturing software) doesn't cut it and you want to do this programatically, you can always use the save() or saveFrame() functions.

    Reference on the save() function: Reference on the saveFrame() function:

    My go-to cheat sheet for this is George Profenza's answer on this Stack Overflow question.

    Again, images exported this way won't be any bigger than a screenshot, since they're just saving whatever is in the screen. Enlarging pictures is a whole separate issue, and you have to be careful to avoid things looking blurry or blocky.

    You could also draw to a larger off-screen buffer and then save that, but that might be a little bit overkill for what you want to do (which is a cool idea, btw). First I'd just try the screenshot method, or exporting the images. Maybe stitch a bunch of these small images together into one big poster?

  • Answer ✓

    IMO PDF is the way to go, but may not do what you want depending on the techniques you are using. Would need to see the sketches to be more specific (and they might need a bit of a rewrite, which isn't ideal)

    There's a tutorial with lots of examples of PDF creation here. Pick the one that applies

    Actually, this discusses a lot of the issues, hadn't seen this before:

  • Thanks for help. I will look into all of the information and give it a try.

Sign In or Register to comment.