title: Python GIF display but is ugly
body: <p>This is the code, really display the gif, but is ugly... i tried to use PIL, but is the same bug. follow the 2 codes (1st my own, 2nd by net) and the print:</p>
  
  <p>gif file (is a random file to test, so cute right? kk): </p>
  
  <p><a href="https://i.imgur.com/DfQqM.gif" rel="nofollow noreferrer"><img src="https://i.imgur.com/DfQqM.gif" alt="link_1"></a></p>
  
  <p>please, see the screenshots to understand:</p>
  
  <p><a href="https://i.stack.imgur.com/DDSuX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DDSuX.jpg" alt="screenshot_1"></a></p>
  
  <p><a href="https://i.stack.imgur.com/yBJ15.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yBJ15.jpg" alt="screenshot_2"></a></p>
  
  <p>1st code:</p>
  
  <pre><code>import tkinter as tk
  from tkinter import Canvas, PhotoImage
  
  x = 0
  
  def animate(self):
      global x
      if x == 32:
          x = 0
      else:
          self.pic["format"] = "gif -index " + str(x)
          self.label1["image"] = self.pic
          x += 1
  
      print(x)
  
      self.after(50, lambda: animate(self))
  
  
  class run(tk.Tk):
  
      def __init__(self, *args, **kwargs):
  
          tk.Tk.__init__(self, *args, **kwargs)
  
          self.pic = PhotoImage(file="/home/arnaldo/Desktop/b.gif", format = "gif -index 0")
  
          self.label1 = tk.Label(width=350, height=233)
          self.label1.pack(expand="yes", fill="both")
  
          animate(self)
  
  run().mainloop()
  </code></pre>
  
  <p>2nd code that i found in net:</p>
  
  <pre><code>from tkinter import * 
  from PIL import Image, ImageTk
  
  
  class MyLabel(Label):
      def __init__(self, master, filename):
          im = Image.open(filename)
          seq =  []
          try:
              while 1:
                  seq.append(im.copy())
                  im.seek(len(seq)) # skip to next frame
          except EOFError:
              pass # we're done
  
          try:
              self.delay = im.info['duration']
          except KeyError:
              self.delay = 100
  
          first = seq[0].convert('RGBA')
          self.frames = [ImageTk.PhotoImage(first)]
  
          Label.__init__(self, master, image=self.frames[0])
  
          temp = seq[0]
          for image in seq[1:]:
              temp.paste(image)
              frame = temp.convert('RGBA')
              self.frames.append(ImageTk.PhotoImage(frame))
  
          self.idx = 0
  
          self.cancel = self.after(self.delay, self.play)
  
      def play(self):
          self.config(image=self.frames[self.idx])
          self.idx += 1
          if self.idx == len(self.frames):
              self.idx = 0
          self.cancel = self.after(self.delay, self.play)        
  
  
  root = Tk()
  anim = MyLabel(root, '/home/arnaldo/Desktop/a.gif')
  anim.pack()
  
  def stop_it():
      anim.after_cancel(anim.cancel)
  
  Button(root, text='stop', command=stop_it).pack()
  
  root.mainloop()
  </code></pre>
  
  <p>both run uglys gifs...</p>