Announcement

Collapse
No announcement yet.

fileLoad seems not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • fileLoad seems not working

    I have write the follow program

    .... here are declaretion and values

    img:=file_LoadImageControl("pictures.dat","pictures.gci",1);
    Tran:=file_LoadImageControl("trans.dat","trans.cgi",1);
    r:=img_Enable(img,-1); // enable all images
    B:=img_Enable(Tran,-1);
    img_SetPosition(Tran,1,0,0);
    gfx_TransparentColour(WHITE);
    gfx_Transparency(OFF);
    repeat
    piso:
    n:=0;
    synolo:=0;
    while(n0)
    img_Show(img,n);
    gfx_Transparency(ON);
    img_Show(Tran,1);// this is gif 1 image into the file
    pause(1500);
    gfx_Transparency(OFF);
    n--;
    wend

    and the problem
    I have 2 image files one named pictures and one named trans
    the imagies from the pictures file are displayed one by one on the screen
    but the image form the trans file never appears.
    this one images is a gif and I want to show one picture from the picture file and then the trans gif image and so on.

  • #2


    At first glance it looks ok,

    Are you able to try showing just the images from the trans.* image control without ever enabling the picture.* image control just to make sure it works by itself? (code example below)

    With regard to gif files, it shouldn't matter what type of file it is, all files are converted to 565 16bit format in the graphics composer, however, we have known in the past
    that some gifs have an odd format and may not work as expected.

    Tran:=file_LoadImageControl("trans.dat","trans.cgi",1);
    //B:=img_Enable(Tran, ALL); // images are enabled by default
    n:=0;
    x:=0;
    y:=0;
    while(n
    Regards,
    Dave

    Comment


    • #3


      I remove the enable command
      I add more pictures at the trans file
      and I copy into my code the while (n

      Comment


      • #4


        You should be able to have 2 image controls running simultaneously.

        I'm still not sure if your transparent images actually work as in the test I gave you to try below.

        Other complications maybe that you are running out of ram, and there is insufficient buffer space for the 2nd image control.

        try placing

        print(mem_Heap()); after the scond image control load, if you dont have at least 3000 bytes I would be a little concerned.

        Are you running your program directly from FLASH?

        put

        #MODE RUNFLASH

        in your file to ensure the program runs from FLASH instead of consuming RAM.

        Things run a little slower from FLASH (approx 25-30%) , but at least you will have plenty of RAM free.
        Regards,
        Dave

        Comment


        • #5


          the print (mem_heap())=10336
          I run the program from flash
          if I put the gif photo into the pictures file, it show it corect.
          I put some jpg photos into the trans file but no photo on the screen

          Comment


          • #6
            ok, so now it sounds like Graphics Composer is not creating file correctly, or disk is corrupt

            Use this bit of code as a tester for your images

            Regards,
            Dave

            Comment

            Working...
            X