This python script creates a window with four buttons, two labels and a text widget. The code is fairly good commented and speaks for itself. The coded file will be written as a text file.

import Tkinter, Tkconstants, tkFileDialog
from Tkinter import *
import tkMessageBox
import base64
import webbrowser

def exit():

def about():
    tkMessageBox.showinfo("Image Encoder","This program converts an image to base64.\nCurrent version is 0.1a")

def select_file():
    text.delete('1.0', END)
    selectedFile = tkFileDialog.askopenfilename( filetypes = ( ("JPG files", "*.jpg"),("PNG files", "*.png"),
                                                               ("GIF files", "*.gif"),("Alle Files","*") ) )
    lblSelectedFileLabel = Label(window, text=selectedFile, font=("Arial", 12)), y=90)

    with open(selectedFile, "rb") as image_file:
        encoded_string = base64.b64encode(
        text.insert(INSERT, encoded_string)

        fh = open("imgEncode.txt", "w")

    #For debugging
    print (selectedFile)
    print (encoded_string)

def clear_text():
    text.delete('1.0', END)

#Create the working window
window = Tk()
window.title("Image encoder")
window.resizable(False, False)

#Create and place Exit button
btnExit = Button(window, text="Exit", width=10, command=exit), y=0)

#Create and place About button
btnAbout = Button(window, text="About", width=10, command=about), y=0)

#Create and place Select File button
btnSelectFile = Button(window, text="Select File", width=10, command=select_file), y=30)

#Create and place Clear button
btnSelectFile = Button(window, text="Clear", width=10, command=clear_text), y=30)

#Create and place the selected file labels
lblFileTxt = Label(window, text="You've selected this file:", font=("Arial", 12)), y=60)

#Create and place a text area
text = Text(window, height=25, width=90), y=120)