We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi,
I want to print my sketch as a somewhat large poster (11x17in). What's the best way to save it so it won't get pixelated?
I tried adding the pdf library but when I search for it in libraries it doesn't show up. I also tried taking a screenshot and changing the ppi to 300 but that made the image too small.
Thanks a lot, Annika
Answers
It is literally the first link on the libraries page (and it's built in, doesn't need to be added)
https://processing.org/reference/libraries/pdf/index.html
Here's some useful overview, which might explain why you can't just change the DPI to 300.
https://processing.org/tutorials/print/
Thanks. I'm a graphic designer so this is not what I do on a daily basis.
For some reason, this doesn't seem to work for my code. I have a function setup() and function draw() instead of void. Does that change anything?
you'll need void - it's the return value from the methods setup() and draw() - void means they don't return a value...
the more detail you give the better the answers will be. currently we have nothing so you get generalities and vagueness.
This is one of the codes I'd like to use for a composition:
/* Fork of https://gist.github.com/jacobjoaquin/615a11ed2e8d2ff704a368e692d74ce0 */
var xOffset = 0; // Perlin x-offset var yOffset = 0; // Perlin y-offset var offsetInc = 0.006; // Perlin offset increment var inc = 1; // Perin increment var s = 3; // Start size of perlin ring var m = 1.005; // Size multiplier
function setup() { createCanvas(3000, 2400); background(255); noFill(); stroke(255, 130, 140, 120); }
function draw() { translate(width * 0.5, height * 0.5);
if (s < 2000) { // Create a series of perlin rings from big to small for (var nTimes = 0; nTimes < 250; nTimes++) {
} else { noLoop(); } }
Any way I can get a high res file (doesn't have to be pdf, can be jpeg or any other image file) out of the last frame?
You need to mark the code as code or the forum displays it as text, which is no use to anyone.
Edit post, highlight the code, press Ctrl-o
oh, that's javascript... not sure it's suitable for hi-def as it's designed for web output...
someone else might have other ideas though.
ok, rewritten as java processing. i had to convert it to use lines rather than beginshape because those didn't show up in the pdf. and i've split the pvector into sin(a) and cos(a) because, er, because i thought there was a bug there but it was actually in the integer division...
screen also now 1000x800 (it used to resize sketches if you used a resolution higher than the screen. plus it's harder to debug fullscreen programs because if they crash the window gets in the way)
You're amazing. Thank you so so much. Been trying to figure this out for the longest time now. Really appreciate your help!!!