Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: VDR Burn: The image could not be loaded
On Sun, 2005-02-06 at 14:27 +0200, Ville Skyttä wrote:
> On Sun, 2005-02-06 at 11:44 +0000, David Thompson wrote:
>
> > However, the image file is indeed in that location, with correct
> > permissions .. and indeed, if I manually run the command outside of vdr
> > as the vdr user "imlib2 imlib_load_image
> > /video/plugins/burn/menu-bg.png" it runs fine.
>
> I have exactly the same problem, but no solution. imlib2 1.2.0.
>
> I added a bit of debugging code to vdr-burn to see the imlib2 error code
> (see attachment), but unfortunately that won't help much; the error is
> always 14 (IMLIB_LOAD_ERROR_UNKNOWN).
Some more info:
I added more error checks / output to vdr-burn (see attachment), and it
seems my imlib2 1.2.0 cannot load nor save png's when used from inside
vdr-burn. It works fine when used elsewhere, and I can't see anything
obviously wrong with the vdr-burn code. Beats me.
Oh, and the good news: downgrading imlib2 to 1.1.2 fixes it for me.
--- render.c.orig 2004-12-02 17:03:07.000000000 +0200
+++ render.c 2005-02-06 22:58:34.656842425 +0200
@@ -92,12 +92,13 @@
void cBurnRender::DrawImage(const char *Filename, int X, int Y) {
Imlib_Image img, old;
+ Imlib_Load_Error error;
int w, h;
old = imlib_context_get_image();
- img = imlib_load_image(Filename);
+ img = imlib_load_image_with_error_return(Filename, &error);
if (!img) {
- esyslog("BURN: The image %s could not be loaded", Filename);
+ esyslog("BURN: Couldn't load image %s, imlib2 error code %d", Filename, error);
if (X != 0 || Y != 0)
return;
w = 720; h = 576;
@@ -251,6 +252,8 @@
imlib_image_set_format("png");
asprintf(&path, "%s/menu-bg-%d.png", mJob->TempDir(), p);
imlib_save_image_with_error_return(path, &error);
+ if (error != IMLIB_LOAD_ERROR_NONE)
+ esyslog("BURN: Couldn't save image %s, imlib2 error code %d", path, error);
free(path);
imlib_free_image();
if (error != IMLIB_LOAD_ERROR_NONE)
@@ -271,7 +274,9 @@
DrawRectangle(0, 0, 720, 576, 0x00000000);
imlib_image_set_format("png");
asprintf(&path, "%s/menu-buttons-ns.png", mJob->TempDir());
- imlib_save_image(path);
+ imlib_save_image_with_error_return(path, &error);
+ if (error != IMLIB_LOAD_ERROR_NONE)
+ esyslog("BURN: Couldn't save image %s, imlib2 error code %d", path, error);
free(path);
imlib_free_image();
@@ -295,6 +300,8 @@
imlib_image_set_format("png");
asprintf(&path, "%s/menu-buttons-h-%d.png", mJob->TempDir(), i);
imlib_save_image_with_error_return(path, &error);
+ if (error != IMLIB_LOAD_ERROR_NONE)
+ esyslog("BURN: Couldn't save image %s, imlib2 error code %d", path, error);
free(path);
imlib_free_image();
if (error != IMLIB_LOAD_ERROR_NONE)
@@ -350,6 +357,8 @@
imlib_image_set_format("png");
asprintf(&path, "%s/menu-bg-%d.png", mRecording->TempDir(), cnt);
imlib_save_image_with_error_return(path, &error);
+ if (error != IMLIB_LOAD_ERROR_NONE)
+ esyslog("BURN: Couldn't save image %s, imlib2 error code %d", path, error);
free(path);
imlib_free_image();
if (error != IMLIB_LOAD_ERROR_NONE)
@@ -371,7 +380,9 @@
DrawRectangle(0, 0, 720, 576, 0x00000000);
imlib_image_set_format("png");
asprintf(&path, "%s/menu-buttons-ns.png", mRecording->TempDir());
- imlib_save_image(path);
+ imlib_save_image_with_error_return(path, &error);
+ if (error != IMLIB_LOAD_ERROR_NONE)
+ esyslog("BURN: Couldn't save image %s, imlib2 error code %d", path, error);
free(path);
imlib_free_image();
@@ -391,6 +402,8 @@
imlib_image_set_format("png");
asprintf(&path, "%s/menu-buttons-h-%d.png", mRecording->TempDir(), i);
imlib_save_image_with_error_return(path, &error);
+ if (error != IMLIB_LOAD_ERROR_NONE)
+ esyslog("BURN: Couldn't save image %s, imlib2 error code %d", path, error);
free(path);
imlib_free_image();
if (error != IMLIB_LOAD_ERROR_NONE)
Home |
Main Index |
Thread Index