Animated GIF creation

# Create 10 frames by reading 10 image files and adding space & annotations at the top of each image.

frame1 <- image_read("./images/frame1.png") %>%
  image_extent("1000x650",
               gravity = "south",
               color = "#A64452") %>%
  image_annotate(text = "Driving is not a game!",
                 gravity = "north",
                 font = "Impact",
                 color = "#FFFFFF",
                 size = 50)

frame2 <- image_read("./images/frame2.png") %>%
  image_extent("1000x650",
               gravity = "south",
               color = "#A64452") %>%
  image_annotate(text = "Driving is not a game!",
                 gravity = "north",
                 font = "Impact",
                 color = "#FFFFFF",
                 size = 50)

frame3 <- image_read("./images/frame3.png") %>%
  image_extent("1000x650",
               gravity = "south",
               color = "#A64452") %>%
  image_annotate(text = "Driving is not a game!",
                 gravity = "north",
                 font = "Impact",
                 color = "#FFFFFF",
                 size = 50)

frame4 <- image_read("./images/frame4.png") %>%
  image_extent("1000x650",
               gravity = "south",
               color = "#A64452") %>%
  image_annotate(text = "Driving is not a game!",
                 gravity = "north",
                 font = "Impact",
                 color = "#FFFFFF",
                 size = 50)

frame5 <- image_read("./images/frame5.png") %>%
  image_extent("1000x650",
               gravity = "south",
               color = "#A64452") %>%
  image_annotate(text = "Driving is not a game!",
                 gravity = "north",
                 font = "Impact",
                 color = "#FFFFFF",
                 size = 50)

frame6 <- image_read("./images/frame6.png") %>%
  image_extent("1000x650",
               gravity = "south",
               color = "#A64452") %>%
  image_annotate(text = "Don't speed!",
                 gravity = "north",
                 font = "Impact",
                 color = "#FFFFFF",
                 size = 50)

frame7 <- image_read("./images/frame7.png") %>%
  image_extent("1000x650",
               gravity = "south",
               color = "#A64452") %>%
  image_annotate(text = "Don't speed!",
                 gravity = "north",
                 font = "Impact",
                 color = "#FFFFFF",
                 size = 50)

frame8 <- image_read("./images/frame8.png") %>%
  image_extent("1000x650",
               gravity = "south",
               color = "#A64452") %>%
  image_annotate(text = "Don't speed!",
                 gravity = "north",
                 font = "Impact",
                 color = "#FFFFFF",
                 size = 50)

frame9 <- image_read("./images/frame9.png") %>%
  image_extent("1000x650",
               gravity = "south",
               color = "#A64452") %>%
  image_annotate(text = "Don't speed!",
                 gravity = "north",
                 font = "Impact",
                 color = "#FFFFFF",
                 size = 50)

frame10 <- image_read("./images/frame10.png") %>%
  image_extent("1000x650",
               gravity = "south",
               color = "#A64452") %>%
  image_annotate(text = "Don't speed!",
                 gravity = "north",
                 font = "Impact",
                 color = "#FFFFFF",
                 size = 50)

# Create a frame vector by the c() function.
frame_vector <- c(frame1, frame2, frame3, frame4, frame5, frame6, frame7, frame8, frame9, frame10)

# Create a 2-fps GIF animation.
image_animate(frame_vector, fps = 2)

Learning reflection

After having lessons on Module 1, I can now create HTML by combining modern technologies. One important idea which I have learnt from this module is that modern technologies can enhance efficiency in building website. With the aid of Markdown language, programmers can now type less coding than before. For example, we can use a single # to replace the <p> and </p> tags. The simplicity characteristic of Markdown language also allows less-skilled programmer to create their HTML pages with less pain. Also, with the help of GitHub, people can now easily share, review and provide feedback to others around the world.

Now, I am quite curious about database management. It is because data is one of the very important elements of data technologies. Thus, we need to have an organised, secured and structured system to manipulate data. Besides, having knowledge of database can lead me to have better career prospects.

Last update

14/3/2022

Home Page

Back