forked from enlightenment/efl
parent
bb17dcb661
commit
1f5e929fd1
|
@ -316,6 +316,11 @@ data_write(void)
|
|||
ecore_init();
|
||||
ecore_evas_init();
|
||||
ee = ecore_evas_buffer_new(1, 1);
|
||||
if (!ee)
|
||||
{
|
||||
fprintf(stderr, "Error. cannot create buffer engine canvas for image load.\n");
|
||||
ABORT_WRITE(ef, file_out);
|
||||
}
|
||||
evas = ecore_evas_get(ee);
|
||||
for (l = edje_file->image_dir->entries; l; l = l->next)
|
||||
{
|
||||
|
@ -460,7 +465,7 @@ data_write(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "%s: Error. unable to load image for image \"%s\" part entry to %s \n",
|
||||
fprintf(stderr, "%s: Error. unable to load image for image \"%s\" part entry to %s. Missing PNG ot JPEG loader modules for Evas or file does not exist, or is not readable.\n",
|
||||
progname, img->entry, file_out);
|
||||
ABORT_WRITE(ef, file_out);
|
||||
}
|
||||
|
|
|
@ -151,8 +151,18 @@ output(void)
|
|||
ecore_init();
|
||||
ecore_evas_init();
|
||||
ee = ecore_evas_buffer_new(1, 1);
|
||||
if (!ee)
|
||||
{
|
||||
fprintf(stderr, "Error. cannot create buffer engine canvas for image save.\n");
|
||||
exit(-1);
|
||||
}
|
||||
evas = ecore_evas_get(ee);
|
||||
im = evas_object_image_add(evas);
|
||||
if (!im)
|
||||
{
|
||||
fprintf(stderr, "Error. cannot create image object for save.\n");
|
||||
exit(-1);
|
||||
}
|
||||
snprintf(buf, sizeof(buf), "images/%i", ei->id);
|
||||
evas_object_image_file_set(im, file_in, buf);
|
||||
snprintf(out, sizeof(out), "%s/%s", outdir, ei->entry);
|
||||
|
@ -167,7 +177,11 @@ output(void)
|
|||
}
|
||||
e_file_mkpath(pp);
|
||||
free(pp);
|
||||
evas_object_image_save(im, out, NULL, "quality=100 compress=9");
|
||||
if (!evas_object_image_save(im, out, NULL, "quality=100 compress=9"))
|
||||
{
|
||||
printf("ERROR: cannot write file %s. Perhaps missing JPEG or PNG saver modules for Evas.\n", out);
|
||||
exit(-1);
|
||||
}
|
||||
evas_object_del(im);
|
||||
ecore_evas_free(ee);
|
||||
ecore_evas_shutdown();
|
||||
|
|
|
@ -31,9 +31,19 @@ main(int argc, char **argv)
|
|||
args_parse();
|
||||
|
||||
ee = ecore_evas_buffer_new(outw, outh);
|
||||
if (!ee)
|
||||
{
|
||||
fprintf(stderr, "Error. cannot create buffer engine canvas for image save.\n");
|
||||
exit(-1);
|
||||
}
|
||||
evas = ecore_evas_get(ee);
|
||||
|
||||
im = ecore_evas_object_image_new(ee);
|
||||
if (!im)
|
||||
{
|
||||
fprintf(stderr, "Error. cannot create buffer canvas image object for scaling.\n");
|
||||
exit(-1);
|
||||
}
|
||||
evas_object_move(im, 0, 0);
|
||||
evas_object_resize(im, outw, outh);
|
||||
evas_object_image_fill_set(im, 0, 0, outw, outh);
|
||||
|
@ -43,6 +53,11 @@ main(int argc, char **argv)
|
|||
evas_im = ecore_evas_get(ee_im);
|
||||
|
||||
im2 = ecore_evas_object_image_new(ee_im);
|
||||
if (!im2)
|
||||
{
|
||||
fprintf(stderr, "Error. cannot create buffer canvas image for scaling.\n");
|
||||
exit(-1);
|
||||
}
|
||||
evas_object_move(im2, 0, 0);
|
||||
evas_object_resize(im2, outw, outh);
|
||||
evas_object_image_fill_set(im2, 0, 0, outw, outh);
|
||||
|
@ -194,7 +209,11 @@ frame_grab(void *data)
|
|||
|
||||
snprintf(buf, sizeof(buf), outfile, frnum);
|
||||
ecore_evas_buffer_pixels_get(ee);
|
||||
evas_object_image_save(im, buf, NULL, "quality=100 compress=9");
|
||||
if (!evas_object_image_save(im, buf, NULL, "quality=100 compress=9"))
|
||||
{
|
||||
printf("Cannot load file \"%s\". Missing saver moduel for Evas or literally cannto write the file (permissions or directory doesnt exist).\n", buf);
|
||||
exit(-1);
|
||||
}
|
||||
frnum++;
|
||||
if (frnum == frames)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue