actions on hundreds or thousands of
images.
If you know PIL and have some nice recipes laying around, it is very
easy to write plugins asPhatchgenerates the corresponding GUI
automagically just like in Django. Any existings PIL scripts can be
added very easily. Let me know if you want to contribute
Thanks for the inspiration!
This what I did (Using your Python Editor (SPE), I really like to work
with SPE, keep up the good work!!):
#
import Image, os
p = # path to image file
im = Image.open(p)
# check if im has Alpha band...
if im.mode != 'RGBA':
Paul McGuire wrote
# following approx fromhttp://www.dfanning.com/ip_tips/color2gray.html
grayscale = lambda (R,G,B) : int(0.3*R + 0.59*G + 0.11*B)
print [ [ grayscale(rgb) for rgb in row ] for row in sampledata ]
Paul
in PIL handbook ,they mention a Luma transform on page15, under
On 22 feb, 15:36, Mike Driscoll [EMAIL PROTECTED] wrote:
On Feb 22, 1:41 am, Mike Driscoll [EMAIL PROTECTED] wrote:
I'm confused. What needs to be compiled exactly? Are there any
directions? I'm not seeing any at that website. I can give it a go if
someone can give me advice.
You
Hi,
I have Visual Studio 6 and .NET 2003 so I think I'm good for that.
I am not sure you even need it. I found here some more instructions
for another project which uses libexiv2, which seems to be quite
straightforward:http://albumshaper.wiki.sourceforge.net/Compiling+on+Windows
I hope
at manipulating individual pictures (such as with
Gimp), but repeating the same actions on hundreds or thousands of
images.
If you know PIL and have some nice recipes laying around, it is very
easy to write plugins as Phatch generates the corresponding GUI
automagically just like in Django. Any existings
On Feb 22, 1:41 am, Mike Driscoll [EMAIL PROTECTED] wrote:
On Feb 20, 4:19 am, Stani [EMAIL PROTECTED] wrote:
Even without python-pyexiv2 Phatch features read-only EXIF support thanks to
PIL. So you can name your files or write data stamps (date, aperature,
velocity,
...) based on EXIF
://translations.launchpad.net/phatch/trunk/+pots/phatch
- at the moment Phatch has no known bugs, I really wish someone could
fine one so I can fix it:
https://bugs.launchpad.net/phatch/
I hope a lot of people give this program a try as it only requires you
to set up wxPython and PIL.
Stani
--
http
just reported a Windows font issue.
I hope a lot of people give this program a try as it only requires you
to set up wxPython and PIL.
I also blogged about it
http://holdenweb.blogspot.com/2008/02/phatch-photo-batch-processor.html
so my reader may take a look :)
regards
Steve
--
Steve
On Feb 22, 2:39 am, SPE - Stani's Python Editor
[EMAIL PROTECTED] wrote:
On Feb 22, 1:41 am, Mike Driscoll [EMAIL PROTECTED] wrote:
On Feb 20, 4:19 am, Stani [EMAIL PROTECTED] wrote:
Even without python-pyexiv2 Phatch features read-only EXIF support thanks
to
PIL. So you can name
by
images * transpose(images)
my problem is how i can use PIL to do the same thing..if i extract
imagedata using im.getdata()
i will get
sampledata
[
[(188, 169, 155), (96, 85, 81),.. (176, 162, 153)]
[(173, 154, 148), (112, 101, 97),.. (155, 140, 133)]
[(196, 176, 167), (100, 83, 76
On Feb 18, 9:58 am, SPE - Stani's Python Editor
[EMAIL PROTECTED] wrote:
I'm pleased to announce the release of Phatch which is a
powerful batch processor and renamer. Phatch exposes a big part of
This program is fantastic! Very accesible user interface and produces
ggreat images.
Thanks!
Since nobody has responded to this:
I know nothing about PIL, but you can do this using numpy and scipy
fairly easily, and you can transform PIL arrays into Numpy arrays pretty
quickly as well.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday
On Feb 21, 7:35 pm, Bronner, Gregory [EMAIL PROTECTED]
wrote:
you can do this using numpy and scipy
fairly easily, and you can transform PIL arrays into Numpy arrays pretty
quickly as well.
i can use numpy ndarray or matrix once i have a PIL array with
elements in the correct format(ie
]
[-5597295.0, -7901339.0,... -5989995.0]
]
/sampledata
i can normalise the above matrix to zeromean and then find covariance
matrix by
images * transpose(images)
my problem is how i can use PIL to do the same thing..if i extract
imagedata using im.getdata()
i will get
sampledata
the executable, not the library.
Even without python-pyexiv2 Phatch features read-only EXIF support thanks to
PIL. So you can name your files or write data stamps (date, aperature,
velocity,
...) based on EXIF information. If you want to save EXIF and IPTC information
to
files you need python
On Feb 19, 1:19 pm, Steve Holden [EMAIL PROTECTED] wrote:
Perhaps you could put a link to the source on the Windows instalL page?
I don't mind being a second-class citizen, but it's annoying to have to
jump around like that.
It is an open wiki, but I changed it. I am a bit reluctant as the
free to translate the other one)
Thans to Frédéric, there is now a tutorial for writing your own actions with PIL
(no knowledge of wxpython needed):
http://photobatch.wikidot.com/writing-actions
Also to understand fully how variables work in Phatch for filenames and folders:
http
-pyexiv2 Phatch features read-only EXIF support thanks to
PIL. So you can name your files or write data stamps (date, aperature, velocity,
...) based on EXIF information. If you want to save EXIF and IPTC information to
files you need python-pyexiv2. From its website:
However, the library and all
Stani [EMAIL PROTECTED] said :
Even without python-pyexiv2 Phatch features read-only EXIF support
thanks to PIL. So you can name your files or write data stamps (date,
aperature, velocity, ...) based on EXIF information.
Oh, that's good. I hadn't looked at PIL for a long while and wasn't
matrix to zeromean and then find covariance
matrix by
images * transpose(images)
my problem is how i can use PIL to do the same thing..if i extract
imagedata using im.getdata()
i will get
sampledata
[
[(188, 169, 155), (96, 85, 81),.. (176, 162, 153)]
[(173, 154, 148), (112, 101, 97),.. (155, 140
def rgbTopixelvalue((r,g,b)):
alpha=255
return unpack(l, pack(, b, g, r, alpha))[0]
That's much worse than averaging the R,G,B components.
oops!
the intention was to pack r,g,b components into a single value sothat
calculations like finding covariant matrix of a set of images
On Feb 19, 12:13 am, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Tue, 19 Feb 2008 04:01:04 -0200, vaneric [EMAIL PROTECTED]
escribió:
On Feb 19, 1:38 am, Robert Kern [EMAIL PROTECTED] wrote:
Averaging color
images is tricky; you really shouldn't do it in the RGB colorspace.
hi,
On 19 feb, 06:28, vaneric [EMAIL PROTECTED] wrote:
def rgbTopixelvalue((r,g,b)):
alpha=255
return unpack(l, pack(, b, g, r, alpha))[0]
That's much worse than averaging the R,G,B components.
oops!
the intention was to pack r,g,b components into a single value sothat
an user friendly GUI. (It is using
python-pyexiv2 to offer more extensive EXIF and IPTC support.) Phatch
is not targeted at manipulating individual pictures (such as with
Gimp), but repeating the same actions on hundreds or thousands of
images.
If you know PIL and have some nice recipes
On 19 feb, 06:55, 7stud [EMAIL PROTECTED] wrote:
On Feb 19, 12:13 am, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Tue, 19 Feb 2008 04:01:04 -0200, vaneric [EMAIL PROTECTED]
escribió:
On Feb 19, 1:38 am, Robert Kern [EMAIL PROTECTED] wrote:
Averaging color
images is tricky; you
SPE - Stani's Python Editor wrote:
I'm pleased to announce the release of Phatch which is a
powerful batch processor and renamer. Phatch exposes a big part of the
Python Imaging Library through an user friendly GUI. (It is using
python-pyexiv2 to offer more extensive EXIF and IPTC support.)
Steve Holden [EMAIL PROTECTED] said :
Perhaps you could put a link to the source on the Windows instalL page?
I don't mind being a second-class citizen, but it's annoying to have to
jump around like that.
I'm interested too, and was also wondering if Phatch is as full-featured
unders
a) Work with the 3 components in parallel (that is, use 3 separate
matrices, one for each component, and regenerate the image at the
end).
that wd be ok for image generation ..but to calculate covariance
matrix from the set of images i don't know if it wd work
eric
--
at manipulating individual pictures (such as with
Gimp), but repeating the same actions on hundreds or thousands of
images.
If you know PIL and have some nice recipes laying around, it is very
easy to write plugins as Phatch generates the corresponding GUI
automagically just like
are welcome.
Requirements:
- PIL 1.1.5 or higher
- wxPython 2.6 or higher
- pyexiv2 (optional)
- python nautilus bindings (optional)
Hm. I just gave it a try on Windows, but in vain. See below.
C:\build\phatch-0.1.bzr385python setup.py install
just says
Sorry your platform is not yet supported.
from
. Packagers for other platforms are welcome.
Requirements:
- PIL 1.1.5 or higher
- wxPython 2.6 or higher
- pyexiv2 (optional)
- python nautilus bindings (optional)
Hm. I just gave it a try on Windows, but in vain. See below.
C:\build\phatch-0.1.bzr385python setup.py install
just says
Sorry
Steve Holden [EMAIL PROTECTED] wrote:
RTFM: the web site instructions clearly state that setup.py doesn't
currently work with Windows.
Do they? http://photobatch.stani.be/ doesn't, following documentation
http://photobatch.stani.be/ doesn't, either. I missed start phatch in
trunk/phatch while
Wolfgang Strobl wrote:
Steve Holden [EMAIL PROTECTED] wrote:
RTFM: the web site instructions clearly state that setup.py doesn't
currently work with Windows.
Do they? http://photobatch.stani.be/ doesn't, following documentation
http://photobatch.stani.be/ doesn't, either. I missed
individual pictures (such as with
Gimp), but repeating the same actions on hundreds or thousands of
images.
If you know PIL and have some nice recipes laying around, it is very
easy to write plugins as Phatch generates the corresponding GUI
automagically just like in Django. Any existings PIL scripts
image and display it.problem is i
need to calculate (xa1+xb1+xc1)/3 etc to calculate avearge value of
each pixel.how can i do this calculation.do i need to convert the
r,g,b in to a single value for each pixel? the average value of a
pixel will be a float isn't it? how can i create a PIL image from
of colorspaces which you could choose; different problems require
different colorspaces.
the average value of a
pixel will be a float isn't it?
Yes.
how can i create a PIL image from
this?
# Cast the floating point data to bytes.
avgface = avgface.astype(numpy.uint8)
# Create the PIL image
of a
pixel will be a float isn't it? how can i create a PIL image from
this?
any help,directive greatly appreciated
eric
import Numeric
arr = Numeric.array([
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
[10, 11, 12]
])
col1 = arr[0:,0]
print col1
sum = 0
count = 0
for num in col1:
sum
the
r,g,b in to a single value for each pixel? the average value of a
pixel will be a float isn't it? how can i create a PIL image from
this?
any help,directive greatly appreciated
eric
import Numeric
arr = Numeric.array([
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
[10, 11, 12
On Feb 18, 2:05 pm, 7stud [EMAIL PROTECTED] wrote:
num = arr[1:, 2:]
That says to get all elements from row 1 to the bottom that are in
from column 2 to the end of the row.
err..
That says to get all elements from row 1 to the last row which are in
column 2, column 3, etc. to the end of the
can i create a PIL image from
this?
any help,directive greatly appreciated
eric
Take a look at ImageChops.difference. I've used it to calculate a
difference value as follows:
diff=ImageChops.difference(im1, im2)
totaldiff=sum(ImageStat.Stat(diff)._getmedian())
Maybe at least this will point
extensive EXIF and IPTC support.) Phatch
is not targeted at manipulating individual pictures (such as with
Gimp), but repeating the same actions on hundreds or thousands of
images.
If you know PIL and have some nice recipes laying around, it is very
easy to write plugins as Phatch generates
image
avgface = avgface.astype(numpy.uint8)
img = Image.fromstring('L', (width, height), avgface.tostring())
is there something wrong with my approach? I am a newbie in PIL/
imageprocessing ..so i would greately appreciate feedback
eric
--
http://mail.python.org/mailman/listinfo/python-list
can't convert to greyscale)
is there something wrong with my approach? I am a newbie in PIL/
imageprocessing ..so i would greately appreciate feedback
eric
--
http://mail.python.org/mailman/listinfo/python-list
En Tue, 19 Feb 2008 04:01:04 -0200, vaneric [EMAIL PROTECTED]
escribió:
On Feb 19, 1:38 am, Robert Kern [EMAIL PROTECTED] wrote:
Averaging color
images is tricky; you really shouldn't do it in the RGB colorspace.
hi,
thanx for the guidance and detailed replies..I tried to pack the
I know there is an easy way to do this, but I can't figure it out, how
do I get the color of a pixel? I used the ImageGrab method and I want
to get the color of a specific pixel in that image. If you know how
to make it only grab that pixel, that would also be helpful.
Basically I'm trying to
Adam W. wrote:
I know there is an easy way to do this, but I can't figure it out, how
do I get the color of a pixel? I used the ImageGrab method and I want
to get the color of a specific pixel in that image. If you know how
to make it only grab that pixel, that would also be helpful.
Gary Herron:
Try image.getpixel((x,y)) to retrieve the pixel at (x,y).
If the OP needs to access many pixels, then he can use the load()
method on the image object, and then read/write pixels (tuples of 3
ints) using getitem []
import Image
im = Image
img = im.load()
img[x,y] = ...
... =
Hi,
I'm trying to run simple .py on linux, which is using PIL. Below error
message which I receive:
File /usr/lib/python2.4/site-packages/PIL/Image.py, line 960, in
histogram
self.load()
File /usr/lib/python2.4/site-packages/PIL/ImageFile.py, line 180, in
load
d = Image._getdecoder
On Feb 1, 5:41 am, dzizes [EMAIL PROTECTED] wrote:
Hi,
I'm trying to run simple .py on linux, which is using PIL. Below error
message which I receive:
File /usr/lib/python2.4/site-packages/PIL/Image.py, line 960, in
histogram
self.load()
File /usr/lib/python2.4/site-packages/PIL
dzizes wrote:
I'm trying to run simple .py on linux, which is using PIL. Below error
message which I receive:
IOError: decoder jpeg not available
Do you know what might be the problem?
No, but google seems to:
http://effbot.org/zone/pil-decoder-jpeg-not-available.htm
Paul
--
http
Dear Fredik,
I have tried to copy PIL folder into my application folder. I am using
Tkinter also, and when I want to put an image as label I do:
photo1 = Image.open(rMyimage.gif)
photo = ImageTk.PhotoImage(photo1)
llogo =Label(root, image=photo,bg=white,height=60)
And I receive
j igisbert.etra-id wrote:
this. I have download Imaging-1.1.6 source code, and I found PIL folder,
but not binary file. If I download windows exe installer, it works
great, but I want to install manually for installing it on my PDA
as the name implies, the source code distribution
: Manually installing PIL
j igisbert.etra-id wrote:
this. I have download Imaging-1.1.6 source code, and I found PIL folder,
but not binary file. If I download windows exe installer, it works
great, but I want to install manually for installing it on my PDA
as the name implies, the source code
I'm using Window XP. How to install PIL 1.1.6? The Python i installed, is come
with Plone. So, is it ok? Thank you.
Regards,
Chan Kuang Lim
-
Looking for last minute shopping deals? Find them fast with Yahoo! Search.--
http://mail.python.org/mailman
Chan Kuang Lim wrote:
I'm using Window XP. How to install PIL 1.1.6? The Python i installed,
is come with Plone. So, is it ok? Thank you.
Just run the appropriate installer for your Python version:
http://www.pythonware.com/products/pil
as the page says, If the Windows installer cannot
I've been doing some image rotation with PIL and comparing the images
with imagemagick's convert -rotate output.
Imagemagick uses an RBS / Paeth rotation algorithm that appears to
give better results than PIL's rotate method.
However, I love PIL and don't want to have to shell out to imagemagick
Hello,
Would anyone know how to generate thumbnails with rounded corners
using PIL? I'm also considering imagemagick if PIL turns out not to be
appropriate for the task.
Thank you so much,
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Alex K wrote:
Would anyone know how to generate thumbnails with rounded corners
using PIL? I'm also considering imagemagick if PIL turns out not to be
appropriate for the task.
create a mask image with round corners (either with your favourite image
editor or using ImageDraw/aggdraw or some
Fredrik Lundh wrote:
create a mask image with round corners (either with your favourite image
editor or using ImageDraw/aggdraw or some such).
and for people stumbling upon via a search engine some time in the
future, Stani just posted a complete example over at the image-sig
mailing list.
I'm using a build of Python 2.5.1 on OS X 10.5.1 that links to Tk 8.5.
Trying to test PIL with this new build, Python barfs when trying to
display an image in a Tkinter Label. Here is my sample code:
---
from Tkinter import *
import Image, ImageTk
root = Tk()
im = Image.open('/Users/kevin
of changes which break Tkinter applications (though not
Tkinter itself).
OTOH, it's more likely that the PIL binaries you are using conflict with
your Tk installation - if the binaries were for Tk 8.4 (which isn't
quite clear to me whether that's indeed the case), then they can't work
with Tk 8.5
Martin v. Löwis wrote:
OTOH, it's more likely that the PIL binaries you are using conflict with
your Tk installation - if the binaries were for Tk 8.4 (which isn't
quite clear to me whether that's indeed the case), then they can't work
with Tk 8.5, as Tk doesn't provide that kind of binary
to be used with 8.5.
Since PIL is a Python library, however, you may be right.
Indeed, this appears to be the problem. I tested my script against the
Python bundled with Mac OS X, which links against 8.4, and it worked fine.
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http
Tk itself has a stubs mechanism that allows libraries compiled against
earlier versions to be used with later versions. It's different than
Python in this respect. A pure-Tk library (such as Img or TkPNG) built
against Tk 8.4 would not require re-compilation to be used with 8.5.
Since PIL
Jose Ignacio Gisbert wrote:
Does somebody install PIL manually??, I mean, copy directories manually
without executing setup.py. I saw an identical message from Guirai, but
I didn’t see any response. Thanks in advance!
PIL's just a bunch of modules in a single PIL directory; you can put
Jair Trejo wrote:
I'm doing some image processing in PIL, and I want to
display the results in a GTK window using PyCairo, so
I create a Cairo image surface from the PIL Image like
this:
data
mfile = StringIO.StringIO()
final.save(mfile, format=PNG)
ima
De: Fredrik Lundh [EMAIL PROTECTED]
A: python-list@python.org
Fecha: Wed, 02 Jan 2008 15:39:11 +0100
Asunto: Re: PyCairo, PIL and StringIO
Jair Trejo wrote:
I'm doing some image processing in PIL, and I want
to
display the results in a GTK window using PyCairo,
so
I create
Hello All,
Does somebody install PIL manually??, I mean, copy directories manually
without executing setup.py. I saw an identical message from Guirai, but I
didn't see any response. Thanks in advance!
Best Regards,
Naxo
--
http://mail.python.org/mailman/listinfo/python-list
I'm doing some image processing in PIL, and I want to
display the results in a GTK window using PyCairo, so
I create a Cairo image surface from the PIL Image like
this:
mfile = StringIO.StringIO()
final.save(mfile, format=PNG)
ima =
cairo.ImageSurface.create_from_png(mfile
I can't seem to find a way to convert an Image.Tk PhotoImage to a PIL
Image so that I can use the [tt]save[/tt] function.
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
Sorry, I don't understand english. But, with Babelfish-translation, I
recovered essence...
(you should learn French ; yes! yes! yes!)
I'm glad you found a solution
Thank you for your solicitude
if that executable doesn't honour the wait
I have just try on another CPU, with a very
Méta-MCI (MVP) wrote:
Hi, Tim!
You are right, for shimgvw.dll (on XP / 2000, or some Vista). But
others Vista (ou users practice) had associate images with
WindowsPhotoGallery.exe.
But shimgvw.dll already exist.
I found that this line:
command = 'start %s /wait
Hi, Tim!
You are right, for shimgvw.dll (on XP / 2000, or some Vista). But
others Vista (ou users practice) had associate images with
WindowsPhotoGallery.exe.
But shimgvw.dll already exist.
I found that this line:
command = 'start %s /wait %s\\System32\\rundll32.exe
Méta-MCI (MVP) wrote:
Re!
I have found the problem. On Vista, the Windows-Photo-Galery (soft
default displayer) don't wait. Even with START /WAIT (in Image.py
_showxv), it don't wait.
Then, like the preview don't wait, the (next) DEL run prior the end of
the launch of the software
Re!
I have found the problem. On Vista, the Windows-Photo-Galery (soft
default displayer) don't wait. Even with START /WAIT (in Image.py
_showxv), it don't wait.
Then, like the preview don't wait, the (next) DEL run prior the end of
the launch of the software ; and Windows-Photo-Galery
Hi!
Not a true solution ; because people who don't have IrfanView don't use
it.
@-salutations
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Méta-MCI (MVP) wrote:
[Excuse my execrable French below]
Sorry, I don't understand english. But, with Babelfish-translation, I
recovered essence...
(you should learn French ; yes! yes! yes!)
Vraiment!
I have just try on another CPU, with a very new Vista-premium
(configuration of exit
Re!
I have found a (very) poor solution:
in Image.py, inside _showxv function,
replace
command = start /wait %s del /f %s % (file, file)
by
command = 'start %s /wait %s\\System32\\mshta.exe %s del /f
%s ' % (title,os.environ['WINDIR'],file,file)
For zoom in preview, use
I have an RGBA .png which PIL is able to read and I would like to convert the
image to a simple RGB image with a single colour reserved for transparent as
the
A channel is either all on or all off.
I thought I could use the the im.getcolors method to find the colours used by
the image
Hi,
I'm filtering an image with a custom kernel. It works fine, except for
the boundaries. image.filter() seems to add a 1px zero-border to the
image to process the pixels at the boundaries of the image.I'd rather
have it replicate the values of the boundary pixels. Is this an option
and where
Hi!
This code:
import Image
img = Image.open(rD:\ParisNude.jpg)
img.show()
Don't run on my Vista computer.
I have a solution:
import Image,os
img = Image.open(rD:\FLundhNoNude.jpg)
os.startfile(img.filename)
It's only in my case?
It's censure? ;-)
PIL does
This code:
import Image
img = Image.open(rD:\ParisNude.jpg)
img.show()
Don't run on my Vista computer.
I have a solution:
import Image,os
img = Image.open(rD:\FLundhNoNude.jpg)
os.startfile(img.filename)
Michel
As an alternative you might also try
for building PIL images from numpy arrays
# Convert a 2-d array with typecode 'b' to an image with mode 'P'
def numpy2pil(arr):
rows = arr.shape[0]
cols = arr.shape[1]
m = arr.tostring()
out = Image.new('L', (cols, rows), 999 )
#out.fromstring(m
I'm trying to determine the transparency information for a png image. With gif
images I can determine the colour that is used for transparent areas using
im.info['transparency']. For the png images of interest there is no such entry
in the info dict. I assume that's because of the way png does
because of the way png does transparency. I'm
guessing I need the alpha channel, but is there a way to get hold
of it?
For accessing the alpha channel, there is an RGBA mode for PNG
files:
http://www.pythonware.com/library/pil/handbook/format-png.htm
Regards,
Björn
--
BOFH excuse #58:
high
://www.pythonware.com/library/pil/handbook/format-png.htm
...
that sounds like what I need.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Any ideas how we can create a color gradient using Python Imaging
Library. Has any got some sample code that can give me some idea. I
need to create a horizontal and vertical color gradient for a college
project
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
I'm trying to read an image with PIL, crop several subimages out of it,
and try to combine the subimages again into a combined new one. This is
a test script, later I want to only several single images into a combined one.
I have to work with 16-bit color windows bitmaps in BMP format.
My input
Thomas Heller schrieb:
I'm trying to read an image with PIL, crop several subimages out of it,
and try to combine the subimages again into a combined new one. This is
a test script, later I want to only several single images into a combined one.
[...]
Here is the code; I'm using Python 2.4
Johny [EMAIL PROTECTED] writes:
I would need to apply a threshold value to the image, where
everything above a certain brightness level becomes white, and
everything below the level becomes black. How can I do that with
PIL?
I think you're supposed to use the point method, but I don't have
Johny [EMAIL PROTECTED] writes:
I use PIL and with it im.getpixel((x,y)) to find out the colour of a
pixel. But how can I find out in which color model the the return
value is?
im.mode gives you a string such as 'RGBA' or 'CMYK'. im.getbands()
returns a tuple such as ('R', 'G', 'B
I use PIL and with it im.getpixel((x,y)) to find out the colour of a
pixel.
But how can I find out in which color model the the return value
is?
For example for png picture format
im.getpixel((20,50)) gives the result 60.
What does the value mean?
Is it possible to find out the RGB model
On Nov 7, 2:53 pm, Hrvoje Niksic [EMAIL PROTECTED] wrote:
Johny [EMAIL PROTECTED] writes:
I use PIL and with it im.getpixel((x,y)) to find out the colour of a
pixel. But how can I find out in which color model the the return
value is?
im.mode gives you a string such as 'RGBA' or 'CMYK
Hi;
I´ve installed Zope 2.10.5 on top of Python 2.4.2 (not optimal, but it will
work, according to the build instructions). I installed Plone 3.0.2 and I get
errors when I crank up Zope, all related to a non-existent PIL. So I d/l/d the
latest PIL, plopped it in my Extensions dir, ran
i am trying to get the pixel data using im.getpixel()
i am getting a tuple like (152,118,106) for a pixel in a RGB jpeg
image .
what i really want is an integer value representing a pixel ,like waht
i can get from java's BufferedImage.getRGB(x,y) ..
i am wondering if someone can advise me on how
On Tue, 16 Oct 2007 07:05:56 +, [EMAIL PROTECTED] wrote:
i am trying to get the pixel data using im.getpixel()
i am getting a tuple like (152,118,106) for a pixel in a RGB jpeg
image .
what i really want is an integer value representing a pixel ,like waht
i can get from java's
Just pack the RGB values into an `int` by shifting and or-ing. Untested:
red, green, blue = img.getpixel(x, y)
pixel_as_int = red 16 | green 8 | blue
Ciao,
Marc 'BlackJack' Rintsch
thanx Marc
will try that
dn
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 7, 8:17 pm, Michal Bozon [EMAIL PROTECTED] wrote:
On Sun, 07 Oct 2007 09:02:09 -0700, Abandoned wrote:
On Oct 7, 4:47 pm, Michal Bozon [EMAIL PROTECTED] wrote:
On Sun, 07 Oct 2007 06:03:06 -0700, Abandoned wrote:
Hi..
I find the picture color with:
im=Image.open(/%s %name)
of
that?
are there anybody who know that
Who knows what? That PIL has e.g. a histogram-function that delivers what
you need (after some thinking, I suggest you try and see at it's output
with various source images)
Diez
--
http://mail.python.org/mailman/listinfo/python-list
501 - 600 of 1021 matches
Mail list logo