Announcement

Collapse
No announcement yet.

file_ScreenCapture Bug

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

  • gregorbader
    replied


    Ups, they got disabled after my edit.
    Now they should be visible again.

    Gregor

    Leave a comment:


  • meldavia
    replied


    Hi Gregor,
    you have forgotten to attach the test code

    Leave a comment:


  • gregorbader
    started a topic file_ScreenCapture Bug

    file_ScreenCapture Bug

    Hi,

    After solving my performance problem (http://4d.websitetoolbox.com/post?id=5027951) i tried to preallocate uSD space by creating a bunch of dummy files (wnd0.img .. wnd9.img)
    big enough to capture whole screen (~152KB).
    When created, the files use sequential uSD Sectors and therefor no time is needed on fragmented disks for creating the file on screen capture.

    For using this method I have to switch from 'w' mode on file_Open to 'a' and rewind the file after opening it.

    Basically this works perfect with the expected performance.
    But now a file_ScreenCapture bug occurs messing up my background on restoring the previous saved capture.

    This bug/problem is mentioned in example POPMSG1.4DG:
    HTML Code:
    #IF EXISTS SAVE_BENEATH
    //gfx_Hline(ypos+h,0,239,WHITE);  // check capture pos if fiddling round, this also shows up problem with file_ScreenCapture()
    var hFile, fnm;
    fnm := "_POPTMP";                                           // temp storage filename
    if(file_Exists (fnm)) file_Erase(fnm);
    hFile := file_Open(fnm, 'w');                               // open a file to save underlying image
    file_ScreenCapture(xpos,ypos,windowWidth+1,h+3, hFile);     // save the area (could be a problem with file_ScreenCapture , noted)
    file_Close(hFile);                                          // now close the file
    #ENDIF
    and there was solved by adding width+1 and height+3 which works perfect for 'w' mode opened files.

    But on 'a' opened files this is not enough and again the capture is messed up.
    Adding 10px to width and height makes it a little better but doesn't solve it.
    And of course this way is no real solution for the problem!

    When will this bug be fixed?

    Test code and files attached. Copy "wnd0.img" on uSD.

    best regards,
    Gregor
    Attached files FileScreenCapture.4dg (2.2 KB) wnd0.zip (307 B)
Working...
X