We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi everyone, I´m starting to use the ketai 'CameraGettingStarted' example. I can compile it well and run on my device, but the image display is a square very small. I only change the Image parameter this is the code. Thanks in advance:
/** *
Ketai Sensor Library for Android: http://KetaiProject.org
* *
<
p>Ketai Camera Features: *
Updated: 2012-10-21 Daniel Sauter/j.duran
*/
import ketai.camera.*;
KetaiCamera cam;
void setup() { orientation(LANDSCAPE); imageMode(CENTER); textSize(45); }
void draw() {
if(cam != null && cam.isStarted()) image(cam, 0,0); else { background(128); text("touch to activate", 100, height/2); } }
void onCameraPreviewEvent() { cam.read(); }
// start/stop camera preview by tapping the screen void mousePressed() { //HACK: Instantiate camera once we are in the sketch itself if(cam == null) cam = new KetaiCamera(this, 640, 480, 24);
if (cam.isStarted()) { cam.stop(); } else cam.start(); } void keyPressed() { if(cam == null) return;
if (key == CODED) { if (keyCode == MENU) { if (cam.isFlashEnabled()) cam.disableFlash(); else cam.enableFlash(); } } }
Answers
@MiniRo===
format your code
of course your image is small because you never set sketch size()
add void settings{ size(800,600); }