vee sivee
unread,Aug 15, 2014, 3:29:42 AM8/15/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to blackberry...@googlegroups.com
adakah yang tau cara embedd geo location ke image??
ini coding vi :
fungsi capture :
camera_take_photo(mHandle, shutterCallback, NULL, NULL,
stillCallback, (void*) this, true);
fungsi stillcallback:
if (buf->frametype == CAMERA_FRAMETYPE_JPEG) {
qDebug() << "still image size:" << buf->framedesc.jpeg.bufsize;
int fd;
char filename[CAMERA_ROLL_NAMELEN];
int err = camera_roll_open_photo(handle, &fd, filename,
sizeof(filename), CAMERA_ROLL_PHOTO_FMT_JPG);
if (err) {
qDebug() << "error opening camera roll:" << err;
} else {
int err = camera_set_geolocation(handle, latitude, longitude, altitude, true);
if (err){
qDebug() << "error set geolocation" << err;
}else{
qDebug() << "saving:" << filename;
int index = 0;
while (index < (int) buf->framedesc.jpeg.bufsize) {
int rc = write(fd, &buf->framebuf[index],
buf->framedesc.jpeg.bufsize - index);
if (rc > 0) {
index += rc;
} else if (rc == -1) {
if ((errno== EAGAIN) || (errno == EINTR)) continue;
qDebug() << "write error:" << errno;
break;
}
}
}
close(fd);
}
}
tapi hasil capture'nya tetep ga ada data geotagging'nya.. owh ya, ini vi pake camera_api.h
apa yang kurang ya??
Mohon pencerahannya ^_^