I am having an issue with resizing QuickTime movies in a player in LiveCode. If I resize the movie in QuickTime, it resizes dynamically and there is no problem with the image quality. When I do the same thing in a player object in LiveCode, I get distortion. It is particularly noticeable if the video includes any text. The font letters become noticeably distorted, as if the image were a bit map and it was stretched too large.
I tested this in a couple of other LiveCode players from the User Samples area, and it displays a similar pattern of behavior.
Is this a known issue? Is there a suggested workaround?
Also, is there an easy way to bring in the aspect ratio (640 x 480, 720 x 480 etc) and maintain it, when resizing. Right now this appears to require hand coding each time the window is resized.
Thanks.
Doug
LiveCode and Quicktime movie resizing issue
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: LiveCode and Quicktime movie resizing issue
Hi Doug,
Can you get the formattedWidth and formattedHeight of the movie? The rescale function below calculates the new width and height.Parameters: 1) current formattedWidth, 2) current formattedHeight, 3) width of the destination area, 4) height of the destination area. The function returns two comma separated values, containing the new width and height, taking the aspect ration into consideration.
Best,
Mark
Can you get the formattedWidth and formattedHeight of the movie? The rescale function below calculates the new width and height.Parameters: 1) current formattedWidth, 2) current formattedHeight, 3) width of the destination area, 4) height of the destination area. The function returns two comma separated values, containing the new width and height, taking the aspect ration into consideration.
Code: Select all
function rescale theImgWidth,theImgHeight,theCdWidth,theCdHeight
if theCdWidth/theImgWidth < theCdHeight/theImgHeight then
put theCdWidth / theImgWidth into myRatio
else
put theCdHeight / theImgHeight into myRatio
end if
put theImgWidth * myRatio into myNewWidth
put theImgHeight * myRatio into myNewHeight
return myNewWidth,myNewHeight
end rescale
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode