LC 9.6.7 export snapshot from a player object seems to fail on Windows (10)

Martin Koob mkoob at rogers.com
Fri Apr 29 08:45:33 EDT 2022


Hi Paul

I just tried the same thing and got the same result.  It works on Mac, not on Windows.

I also tried exporting the image as a file to see if that made any difference. 

              export snapshot from rect tRect of player "mediaConvert" of stack "libHrAPI" to file [filepath/filename.png] as PNG

 I got an image file but it is the same as what you see in the image object on the stack — an image of a white rect inside the player boarder.

So it looks like it is a bug.  The snapshot does create a proper png it just doesn’t grab the current video image inside the player it just gets a white rect.

Martin

> On Apr 27, 2022, at 6:21 PM, Paul Dupuis via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> I am executing the following 2 lines of code:
> 
>               export snapshot from rect tRect of player "mediaConvert" of stack "libHrAPI" to tImage as PNG
>               put tImage into img "imageConvert" of stack "libHrAPI"
> 
> Prior to the export the player has a video load and has the currentTime set to a particular frame, and I can see in the stack that the player is showing the correct frame is visible.
> I can also see that the image "imageConvert" is also visible, but empty
> 
> After the Export Snapshot is executed, it looks like tImage contains valid PNG data, although I can not tell if it is the correct image
> After the Put statement, the image "imageConvert" is set to a white rectangle with a little bit of the player border on the left and top. It is the same size as the player where as the empty image I started with was larger.
> 
> This is with LC 9.6.7 on Windows 10. This code works on macOS. Does anyone know if there is a known Windows bug with export a snapshot form a player and any work around?
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list