Save in large size.
in
Programming Questions
•
3 years ago
Hi,
When I try to save an image in large size.
the image moves to the left, and is not saved centered.
There any way to large-scale gusrdar pictures easily and without the image move?
code sample
Thanks
When I try to save an image in large size.
the image moves to the left, and is not saved centered.
There any way to large-scale gusrdar pictures easily and without the image move?
code sample
- PGraphics co;
- void setup()
- {
- size(600,600,P3D);
- co= createGraphics(3000,3000, P3D);
- co.beginDraw();
- co.background(0);
- co.endDraw();
- //drawShape();
- }
- void draw()
- {
- //background(mouseY,0,0);*/
- //stroke(0,255,0);
- //line(0,0,width,height);
- image(context1,0,0);
- }
- void mousePressed() {
- drawShape(mouseX, mouseY);
- }
- void drawShape(int x, int y){
- co.beginDraw();
- co.fill(255);
- // co.noStroke();
- co.stroke(200);
- co.translate(x, y);
- //co.rect(0, 0, 40, 40);
- co.ellipse(0, 0, 100,100);
- co.endDraw();
- //output.background(255,0);
- }
- //**************
- void keyPressed()
- {
- switch (key)
- {
- case '?':
- //showHelp = !showHelp;
- break;
- case 's':
- co.save("Snapshots/poll-####.png");
- //saveFrame("Snapshots/poll-####.jpg");
- break;
- }
- }
Thanks
1