Let's say you want to send a short private message to your friend, but don't want grandma to snoop around and find it. One way is to use the Python Image Library (PIL) and hide the message in a picture file's pixels. Just looking at the picture you will barely detect any difference between the before and after picture. All your friend needs is the decode_image portion of this simple code to get the message back.

Member Avatar
Member Avatar
+5 forum 11

Sometimes it's easier to pick an image from the internet to display in your Python Tkinter GUI toolit program.

Member Avatar
Member Avatar
+1 forum 1

On my Raspberry Pi computer I did a search for PIL and matplotlib with apt-cache search python but could not find anything close in the list. Is PIL/Pillow and matplotlib available for Linux and what is it called? The Raspberry Pi has Python27 and Python32 installed.

Member Avatar
Member Avatar
+0 forum 4

An image resize script that I have written to scale images from a digital camera. I couldn't used the gimp (my favourite image editor) to scale each of them one by one. This script takes two arguments which are both directory names. The first one is the directory containing images and the second one is the directory where the resized images are going to be stored. Adjust the global variables declared before the class imageResize to your liking. Hope this script will be helpful to anyone wishing to go about resizing images in large scale. Note that this class needs …

Member Avatar
Member Avatar
+0 forum 3

Hello, I have a mac os specific problem with iPython. The code I have works fine by using iPython on a PC by launching it with --pylab. On mac os, I try to do it with ipython-qtconsole-1.0.0-py27_0 My code is made for recognizing characters on an image. The part of the code where I'm trying to recognize the characters is # Loop over rows... for row in xrange(number_of_rows): # Loop over columns... for col in xrange(number_of_cols): # Compute char coordinates. coords = ( col * char_width, row * char_height, (col+1) * char_width, (row+1) * char_height ) # Extract and display …

Member Avatar
Member Avatar
+0 forum 1

Hello , I am making tries to display images in different tkinter windows , in every window displaying a different image , for this i made this code : # -*- coding: cp1252 -*- from Tkinter import * import Tkinter as tk import ttk from PIL import ImageTk, Image import os def interface2(): fenetre2=Toplevel() fenetre2.geometry("500x400") fenetre2.title(' ') f1 = Frame(fenetre2, bg="blue", width=500, height=400) f1.pack( fill=X, expand=0) print modelidmodifvar2 print "image%s.jpg"%(modelidmodifvar2) img2 = ImageTk.PhotoImage(Image.open("image%s.jpg"%modelidmodifvar2)) labimg.config( image=img2 ) print 'ok' lab1 = Label(fenetre2, text="Gestion de ressources informatiques" , bg = "blue", fg = "white" ) lab1.place ( x=152 , y=25 ) buttonquit …

Member Avatar
Member Avatar
+0 forum 2

Simple code to show you how to display an image from a Web URL using the Tkinter Python GUI toolkit, the Python Image Library (PIL) and the data_stream created with io.BytesIO().

Member Avatar
Member Avatar
+3 forum 4

Hi :) Can anyone help me? I want to display image in my GUI using tkinter (python 3.2.2) Do i need to download this python image library ==> PIL-1.1.7.win32-py3.2 or actually it was already in tkinter? How about the code? Thanks for the help.

Member Avatar
Member Avatar
+0 forum 2

Hi guys, when I process some images (where apparently the dpi info is missing for python) I get a Keyerror: 'dpi'. Is there an easy way to capture this error or set the dpi to 72 if this info is not available? Thanks a lot

Member Avatar
+0 forum 0

Simple script for image transparency. Someone asked one some time ago, and i had other but for a different system, and decided to write a Python/PIL version. The value of the color used as transparent is the value of the pixel at position (0, 0). You can adjust tolerance value. Happy coding!

Member Avatar
Member Avatar
+0 forum 3

The End.