Skip to content

Commit

Permalink
Adding more projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh151200 committed Apr 3, 2021
1 parent 7c6ac06 commit 45de94b
Show file tree
Hide file tree
Showing 14 changed files with 73 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,6 @@ Demo/

Python Password Generator .pdf

Projects-1.zip
Projects-1.zip

Projects2.zip
11 changes: 11 additions & 0 deletions Gif-Creator/gif-creator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""
Slide Show - Make an application that shows various pictures in a slide show format.
Optional: Try adding various effects like fade in/out, star wipe and window blinds transitions.
"""

import imageio
filenames = ["Image-Slideshow/mountains.jpg","Image-Slideshow/lakes.png"]
images = []
for filename in filenames:
images.append(imageio.imread(filename))
imageio.mimsave('Image-Slideshow/movie.gif', images,'GIF',duration=1)
Binary file added Gif-Creator/lakes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Gif-Creator/mountains.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Gif-Creator/movie.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Gif-Creator/number.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Gif-Creator/video-to-gif.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from moviepy.editor import *

from moviepy.editor import *
clip = (VideoFileClip("Gif-Creator/video.webm").subclip((2.25),(6.25))
.resize(0.3))
clip.write_gif("output.gif")
Binary file added Gif-Creator/video.webm
Binary file not shown.
Binary file added Image-Slideshow/gallery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions Image-Slideshow/image-slideshow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
"""
Slide Show - Make an application that shows various pictures in a slide show format.
Optional: Try adding various effects like fade in/out, star wipe and window blinds transitions.
"""

from tkinter import*
from PIL import ImageTk, Image
import time


class Slider:
def __init__(self, root):
self.root = root
self.root.title("TryCatch Image Slideshow")
self.root.geometry("900x500")
image = Image.open('Image-Slideshow/lakes.png')
image = image.resize((700, 400), Image.ANTIALIAS)
self.image1 = ImageTk.PhotoImage(image)
image = Image.open('Image-Slideshow/mountains.jpg')
image = image.resize((700, 400), Image.ANTIALIAS)
self.image2 = ImageTk.PhotoImage(image)

Frame_slider = Frame(self.root)
Frame_slider.place(x=150, y=70, width=600, height=350)
self.lbl1 = Label(Frame_slider, image=self.image1, bd=0)
self.lbl1.place(x=0, y=0)
self.lbl2 = Label(Frame_slider, image=self.image2, bd=0)
self.lbl2.place(x=1920, y=0)
self.x = 1920
self.slider_func()

def slider_func(self):
self.x -= 1
if self.x == 0:
self.x = 1100
time.sleep(1)
self.new_im = self.image1
self.image1 = self.image2
self.image2 = self.new_im
self.lbl1.config(image=self.image1)
self.lbl2.config(image=self.image2)
self.lbl2.place(x=self.x, y=0)
self.lbl2.after(1, self.slider_func)


root = Tk()
obj = Slider(root)
root.configure(bg="powderblue")
photo = PhotoImage(file="Image-Slideshow/gallery.png")
title = Label(root, text="Image Slideshow",
fg="Black",bg="powderblue" ,font=("Arial", 25, 'bold')).place(x=320, y=10)
root.iconphoto(False, photo)
root.mainloop()
Binary file added Image-Slideshow/lakes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image-Slideshow/mountains.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image-Slideshow/movie.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image-Slideshow/number.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 45de94b

Please sign in to comment.