Exemplo n.º 1
0
        /// <summary>
        /// Grab a frame 30 seconds in from the video
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void autoGrabFrame30SecsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DBBasicInfo mv = null;
              mv = CurrentTrack;
              if (mv != null)
              {
            string artFolder = mvCentralCore.Settings.TrackArtFolder;
            string safeName = CurrentTrack.Track.Replace(' ', '.').ToValidFilename();
            string filename1 = artFolder + "\\{" + safeName + "} [" + safeName.GetHashCode() + "].jpg";
            string tempFilename = Path.Combine(Path.GetTempPath(), "mvCentralGrabImage.jpg");

            FrameGrabber fr = new FrameGrabber();
            fr.GrabFrame(CurrentTrack.LocalMedia[0].File.FullName, tempFilename, 10);
            mvCentralUtils.ResizeImageWithAspect(tempFilename, filename1, 600);
            mv.AlternateArts.Add(filename1);
            mv.Commit();
            setArtImage();
            UpdateDbPage();
              }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Allow grabbing of fram from actual video
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void loadArtFromMusicVideoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string artFolder = mvCentralCore.Settings.TrackArtFolder;
              string safeName = CurrentTrack.Track.Replace(' ', '.').ToValidFilename();
              string filename1 = artFolder + "\\{" + safeName + "} [" + safeName.GetHashCode() + "].jpg";
              string tempFilename = Path.Combine(Path.GetTempPath(), "mvCentralGrabImage.jpg");

              FrameGrabber fr = new FrameGrabber();
              fr.GrabFrame(CurrentTrack.LocalMedia[0].File.FullName, tempFilename, 10);
              mvCentralUtils.ResizeImageWithAspect(tempFilename, filename1, 600);
              ArtPopup popup1 = new ArtPopup(filename1);
              popup1.Owner = this.ParentForm;
              popup1.ShowDialog();
              CurrentTrack.AlternateArts.Add(filename1);
        }