Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I'm looking for a good solution to create slideshow videos from images from within a programming environment (so I can't use a component unless it is command line or integrates with .NET C#)... So far I have not found any components less than $400 that will do Ken Burns (Pan and Zoom effects), integrate music, and produce a video file.

So! I've found many components that do everything except the pan and zooming effect, and I am hoping someone could either recommend a better component OR give me a clue or link to a proper article explaining enough about the effect that I could write some code to do image manipulation (take my starting jpg and string additional jpgs to the same effect)
Posted
Comments
Sergey Alexandrovich Kryukov 10-Mar-11 4:35am    
Do you mean pan and zoom into video picture or something else?
--SA
Versile 10-Mar-11 4:38am    
Yeah I can convert a string of images to a video already so if I can get some guidance on the pattern for pan and zoom is it possible to mimic the effect.

1 solution

There is A tool For Wpf which can do Zoom Panning and also can give zoom in Zoomout effect in animated version but it is a Paid Tool for 69$ something
http://www.wpf-graphics.com/ZoomPanel.aspx[^]

There is also a method to give Zoom effect to Image in C# codes goes this way
note use any Image I hv used Sketch.jpg here
In Xmal

XML
<Window x:Class="MoveAndZoom.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="500" Width="500">
    <Canvas Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch" x:Name="ImageHolder" >
        <Image Canvas.Left="0" MouseWheel="Img_MouseWheel" MouseMove="Img_MouseMove"
               MouseDown="Img_MouseDown" MouseUp="Img_MouseUp" Panel.ZIndex="0"
               Cursor="Hand" Canvas.Top="0" Height="150" Width="150" Source="sketch.jpg"
               x:Name="Img">
        </Image>
    </Canvas>
</Window>


and the Code Behind are

C#
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace MoveAndZoom
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        Point p;
        public Window1()
        {
            InitializeComponent();
        }
        private void Img_MouseWheel(object sender, MouseWheelEventArgs e)
        {
            Img.Height += e.Delta;
            Img.Width += e.Delta;
        }
        private void Img_MouseMove(object sender, MouseEventArgs e)
        {
            Point x = e.GetPosition(ImageHolder);
            if (e.LeftButton == MouseButtonState.Pressed)
            {
                Canvas.SetLeft(Img, Canvas.GetLeft(Img) + (x.X - p.X));
                Canvas.SetTop(Img, Canvas.GetTop(Img) + (x.Y - p.Y));
            }
            p = x;
        }
        private void Img_MouseDown(object sender, MouseButtonEventArgs e)
        {
            Img.CaptureMouse();
            p = e.GetPosition(ImageHolder);
        }
        private void Img_MouseUp(object sender, MouseButtonEventArgs e)
        {
            Img.ReleaseMouseCapture();
        }
    }
}


U can use the Same codes for Videos too
 
Share this answer
 
v3
Comments
Dalek Dave 10-Mar-11 7:14am    
That earns a 5!
amitkarnik2211 10-Mar-11 7:55am    
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900