Putting images in a database?
in
Programming Questions
•
3 years ago
Hi,
i want to make a sketch that calls my webcam and saves an image by clicking the mouse and then put it in a mysql database, i did a simple sketch to take picture by clicking my mouse, but i'm really newbie for database.
I found the SQLibrary to connect my processing to the data base.
Can someone please guide me to which approach i have to take to do this well?
I'm learning some basic steps of MYSQL and i saw that i have to send a BLOB value to the datebase for the images, but how to do it exactly?
do i have to learn php?
do you know some tutorials to do this?
here is my simple sketch until now :
i know it's not a easy question to answer but any help will be very appreciated,
thanks,
Rodrigo
i want to make a sketch that calls my webcam and saves an image by clicking the mouse and then put it in a mysql database, i did a simple sketch to take picture by clicking my mouse, but i'm really newbie for database.
I found the SQLibrary to connect my processing to the data base.
Can someone please guide me to which approach i have to take to do this well?
I'm learning some basic steps of MYSQL and i saw that i have to send a BLOB value to the datebase for the images, but how to do it exactly?
do i have to learn php?
do you know some tutorials to do this?
here is my simple sketch until now :
- import processing.video.*;
Capture cam;
int x = 0;
int i = 0;
void setup() {
size(640, 480);
cam = new Capture(this, 320, 240);
}
void draw()
{
if (cam.available() == true) {
cam.read();
image(cam, 160, 100);
}
}
void mousePressed() {
save("image"+i+".jpg");
i= i+1;
}
i know it's not a easy question to answer but any help will be very appreciated,
thanks,
Rodrigo
1