Languages

Menu
Sites
Language
edje_cc: Critical. Unable to load image

I put a .gif image file under /res/images/, fullpath is /res/images/loading.gif.

I declare the images block in the .edc file under /res/ folder. 

images 
{
    image: "loading.gif" COMP;
}

collections {
    #include "../edc_resource/startpage.edc"
}

And in my startpage.edc file, I declare below image part,

        part { 
            name: "loading_gif";
            type: IMAGE;
            description {
                state: "default" 0.0;
                fixed: 0 0;
                rel1 { relative: 0.5 0.5; offset: -16 -16; }
                rel2 { relative: 0.5 0.5; offset: 16 16; }
                image { normal: "loading.gif"; }
            }
        }

When I trying to build my project, I got the edje_cc error as the title. Paste more detailed error message here,

'Building file: ../res/my_XXX.edc'
'Invoking: EDC Resource Compiler'
edje_cc -id "C:\Users\cnincora\tizenworkspace\myXXX/res/images" -id "C:/tizen-sdk/tools/enventor/share/enventor/images" -sd "C:\Users\cnincora\tizenworkspace\myXXX/res/sounds" -sd "C:/tizen-sdk/tools/enventor/share/enventor/sounds" -fd "C:\Users\cnincora\tizenworkspace\myXXX/res/fonts" -fd "C:/tizen-sdk/tools/enventor/share/enventor/fonts"  "../res/my_XXX.edc" "res/my_XXX.edj"
edje_cc: Critical. Unable to load image "loading.gif" used by file "res/my_XXX.edj": File (or file path) does not exist. Check if path to file "loading.gif" is correct (both directory and file name).
res/subdir.mk:15: recipe for target 'res/my_XXX.edj' failed
make: *** [res/my_XXX.edj] Error -1

Anyone ever been encounter such issue? Many thanks for any response.

Responses

6 Replies
Alex Ashirov

Hi,

The paths to external files such as sounds, images, or fonts resources are passed to the edje_cc tool as command line parameters. You can check this:

Right-click on you project in the Project Explorer.

Choose Properties->C/C++ Build->Settings

Then goto Tool Settings tab and choose EDC Resource Compiler. At the right side of the window you will see edje_cc command line options.

Please check that your Image directory (-id option) is correct.

colin Rao

Hi,
Yes, the image path and name are correct. 
I've do some testing, seems the images declare and it's usage case must be in the same .edc file. When I put the images declare in my startpage.edc file, as below 

/* global .edc file */
collections {
    #include "../edc_resource/startpage.edc"
}

/* startpage.edc */
images 
{
    image: "loading.png" COMP;
    //image: "loading.gif" RAW;
}

group {
    name: "loading";
    parts{
        part {
            name: "loading_text";
            type: TEXT;
            //scale: 1;
            description {
                state: "default" 0.0; 
                rel1 { relative: 0.5 0.4; offset: -60 -16;}
                rel2 { relative: 0.5 0.4; offset: 60 16;}
                align: 0.5 0.5;
                text {
                    font: "Tizen:style=Regular";
                    size: 28;
                    text: "Loading...";
                    min: 1 1;
                    align: 0.5 0.5;
                }
                color: 173 170 165 255;
            }
        }
        part { 
            name: "loading_icon";
            type: IMAGE;
            scale: 1;
            description {
                state: "default" 0.0;
                rel1 { relative: 0.0 0.0; offset: 22 36; to: "loading_text"; }
                rel2 { relative: 0.0 0.0; offset: 70 86; to: "loading_text"; }
                image { normal: "loading.png"; }
            }
        }
    } //end parts
} //end group

Another issue, seems edje not suppor the .gif dynamic image(multi-frame). I've try the .gif image, but failed.

Alex Ashirov

Hi,

Animated gifs should be supported. Please take a look at elm_image_animated_play_set() function.

colin Rao

Hi, 

Thanks for you response.

Did it can be set in .edc file? Is there any sample code? Many thanks!

Alex Ashirov

Hi,

Unfortunately I have not found samples of that. But as far as I understand you can access gif images stored in .edj files (compiled .edc) as Edje Objects:

https://developer.tizen.org/dev-guide/2.3.0/org.tizen.mobile.native.apireference/group__Edje__Object__Group.html

And then call elm_image_animated_play_set() on the image (Evas_Object*).

colin Rao

Hi,

One more question, as my comments "BY colin Rao, 21 Dec 2014, 22:19". 

Why the images declares must be in the same .edc file. I've do the testing, separate the images declares and usage in different files, I'll get the error message

Unable to load image "loading.gif" used

Is there a way to fix this issue?