lib/songster/generator.rb
def create_side_by_side_example
      # Resize the original image to 40% of the size.
      Commander.run!("convert #{@dir}/original.miff",
                     "-resize 40%",
                     "#{@dir}/original_smaller.miff")

      # Resize the singing image to 40% of the size.
      Commander.run!("convert",
                     Songster.output_folder.join("#{@fname}-singing.gif").to_s,
                     "-resize 40%",
                     "#{@dir}/singing_smaller.miff")

      # Put two closed mouth side by side.
      Commander.run!("convert",
                     "#{@dir}/original_smaller.miff #{@dir}/original_smaller.miff",
                     "+append",
                     "#{@dir}/sidebyside_closed.miff")

      # Put a closed and opened mouth side by side.
      Commander.run!("convert",
                     "#{@dir}/singing_smaller.miff",
                     "+append",
                     "#{@dir}/sidebyside_opened.miff")

      Commander.run!("convert -loop 0 -delay 30",
                     "#{@dir}/sidebyside_closed.miff #{@dir}/sidebyside_opened.miff",
                     Songster.debug_folder.join("#{@fname}-sidebyside.gif").to_s)
    end
# Resize the original and singing images to 40% of their size
# and put them side by side.
Resize the original and singing images to 40% of their size
and put them side by side.
Resize the original and singing images to 40% of their size and put them side by side .
def create_side_by_side_example
      Commander.run!("convert #{@dir}/original.miff",
                     "-resize 40%",
                     "#{@dir}/original_smaller.miff")
      Commander.run!("convert",
                     Songster.output_folder.join("#{@fname}-singing.gif").to_s,
                     "-resize 40%",
                     "#{@dir}/singing_smaller.miff")
      Commander.run!("convert",
                     "#{@dir}/original_smaller.miff #{@dir}/original_smaller.miff",
                     "+append",
                     "#{@dir}/sidebyside_closed.miff")
      Commander.run!("convert",
                     "#{@dir}/singing_smaller.miff",
                     "+append",
                     "#{@dir}/sidebyside_opened.miff")
      Commander.run!("convert -loop 0 -delay 30",
                     "#{@dir}/sidebyside_closed.miff #{@dir}/sidebyside_opened.miff",
                     Songster.debug_folder.join("#{@fname}-sidebyside.gif").to_s)
    end
def create_side_by_side_example Commander . run! ( "convert #{@dir}/original.miff" , "-resize 40%" , "#{@dir}/original_smaller.miff" ) Commander . run! ( "convert" , Songster . output_folder . join ( "#{@fname}-singing.gif" ) . to_s , "-resize 40%" , "#{@dir}/singing_smaller.miff" ) Commander . run! ( "convert" , "#{@dir}/original_smaller.miff #{@dir}/original_smaller.miff" , "+append" , "#{@dir}/sidebyside_closed.miff" ) Commander . run! ( "convert" , "#{@dir}/singing_smaller.miff" , "+append" , "#{@dir}/sidebyside_opened.miff" ) Commander . run! ( "convert -loop 0 -delay 30" , "#{@dir}/sidebyside_closed.miff #{@dir}/sidebyside_opened.miff" , Songster . debug_folder . join ( "#{@fname}-sidebyside.gif" ) . to_s ) end
Resize the original and singing images to 40% of their size
and put them side by side.
Resize the original and singing images to 40% of their size and put them side by side .
# Resize the original image to 40% of the size. # Resize the singing image to 40% of the size. # Put two closed mouth side by side. # Put a closed and opened mouth side by side.