[PB5.20Beta12] PlayMovie Size bug?

Windows specific forum
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

[PB5.20Beta12] PlayMovie Size bug?

Post by IdeasVacuum »

[PB5.20Beta12, WinXPx86]
I have a tiny, very simple avi file, 100 x 100pix. Plays back perfectly in WMP and QT.
When PB plays it, the movie is distorted, because it gets re-sized to 125 x 100.

Code: Select all

InitMovie()

Procedure Win()
;--------------
Protected sMovie.s = GetPathPart(ProgramFilename()) + "Busy.avi"
Protected iMovie.i = LoadMovie(#PB_Any, sMovie)

       If OpenWindow(0, 0, 0, 200, 200, "Wonky PlayMovie", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)

                         ResizeMovie(iMovie, 0, 0, 100, 100)
                           PlayMovie(iMovie, WindowID(0))
                   While MovieStatus(iMovie) = 0 : Wend
       EndIf

EndProcedure

Win()
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
End
Busy.avi
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
JHPJHP
Addict
Addict
Posts: 2273
Joined: Sat Oct 09, 2010 3:47 am

Re: [PB5.20Beta12] PlayMovie Size bug?

Post by JHPJHP »

Try rearranging the order so that ResizeMovie is after PlayMovie: (Windows 7 64bit - PB 5.20 Beta 17)

Code: Select all

PlayMovie(iMovie, WindowID(0))
ResizeMovie(iMovie, 0, 0, 100, 100)
... allowed me to play the movie you provided at any size (10, 50, 100, etc.).
Last edited by JHPJHP on Thu Sep 12, 2013 11:39 pm, edited 1 time in total.

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: [PB5.20Beta12] PlayMovie Size bug?

Post by IdeasVacuum »

Yeah, those functions were the wrong way round but it makes no difference. It seems that for some strange reason PB is hard-coded to play movies that are a minimum 125pix wide, so I have re-made it to 125 x 125 and that works fine. Really should work with smaller sizes though......
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply