This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Saturday, January 21, 2012 12:45:32 PM(UTC)
Groups: Registered
Posts: 8
Forgot to include my error message that I'm getting. It is timing out when trying to do this. Here is the code
Private Sub updatePlayer()
ltmmPlay.SelectionStart = lstTimes.Text
ltmmPlay.SelectionEnd = lstTimes.Text
ltmmPlay.PreviousFrame
ltmmPlay.NextFrame
ltmmPlay.SeekSelectionEnd
ltmmPlay.SaveStillBitmap "C:\Users\Adam\Dropbox\VBLtmm\newPic.bmp", ltmmCapture_StillFormat_BMP, 0, 0, 5000
lblCurrentFrame.Caption = ltmmPlay.CurrentFramePosition
lblCurrentPosition.Caption = ltmmPlay.CurrentPosition
End Sub
Obviously the filename is for testing. Any help is greatly appreciated!
#2
Posted
:
Saturday, January 21, 2012 12:51:41 PM(UTC)
Groups: Registered
Posts: 8
Sorry for the back to back posts. Finally found the solution. You must set the StillTap property before taking a stillImage. Wasn't very clear to me but I'm rushing so maybe it was my fault. Thanks!
#3
Posted
:
Saturday, January 21, 2012 1:29:35 PM(UTC)
Groups: Registered
Posts: 8
.. Or thought I did. I ALWAYS get a timeout on creating the 2nd bitmap in this code (if it doesn't time out on the first one).. No this isn't any kind of limitations from my computer. Any help? I've tried setting stilltap once and stilltap everytime stillbitmap is called.
For i = 0 To lstTimes.ListCount
updatePlayer
fileName = EnsureTrailingSlash(App.path) & _
EnsureTrailingSlash(getFilenameLessExtension(ltmmPlay.sourcefile)) & _
getFilenameLessExtension(ltmmPlay.sourcefile) & _
"-" & ltmmPlay.CurrentFramePosition & ".bmp"
ltmmPlay.StillTap = 0
ltmmPlay.SaveStillBitmap fileName, ltmmCapture_StillFormat_BMP, 0, 0, 5000
If lstTimes.ListIndex < lstTimes.ListCount - 1 Then
lstTimes.ListIndex = lstTimes.ListIndex + 1
Else
lstTimes.ListIndex = 0
End If
Next i
Updateplayer just seeks to the next frame I need. lstTimes holds the times in the video file that I need to seek to.
#4
Posted
:
Saturday, January 21, 2012 1:34:58 PM(UTC)
Groups: Registered
Posts: 8
Must set stilltap to 0 or 1 to take the stillbmp. Then you must set stilltap to -1. You must do this every time you take a picture in that order. Also, the SaveStillBMP takes the same picture of frame 0 over and over again? Any clue here?
#5
Posted
:
Sunday, January 22, 2012 8:32:09 AM(UTC)
Groups: Registered
Posts: 256
I tested this issue at my side and I was able to use SaveStillBitmap() with a play control without any problem using the attached sample project.
Please test this and if this is not what you want please modify the project to show the problem and upload it here.
Note: If you want to upload anything do not use the preview option.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.