Thanks again to everybody,
Your answers helped me to understand better.
My pragmatic solution is now to package my program
with an open source .ttf font,
which will be used on both platforms.
On 08/04/2011 10:24 PM, Irmen de Jong wrote:
> On 4-8-2011 21:30, Irmen de Jong wrote:
>
>> As far as
On 4-8-2011 21:30, Irmen de Jong wrote:
> As far as I know, I did not see any difference in output on windows, linux
> and mac os x
> as long as the code used the same ttf file and PIL versions. (but I'll double
> check now
> and see if I remember this correctly).
To follow up on myself, I've j
On 4-8-2011 20:54, Gelonida N wrote:
> The reason why I want the images to look identical is very simple.
> Though the final web server will run on a linux server, I use sometimes
> windows for development or as test server.
>
> For automated tests I would have liked pixel identical images.
> th
On 08/04/2011 12:32 PM, Thomas Jollans wrote:
> On 04/08/11 12:04, Gelonida N wrote:
Thanks for your answer.
>> >From within a django application
>> I'd like create a small image file (e.g. .png)
>> which just contains some text.
>>
>> I wondered what library would be appropriate and would yield t
Gelonida N wrote:
> I wondered what library would be appropriate and would yield the same
> result independent of the OS (assuming the versions of the python
> libraries are the same)
> Images should be pixel identical independent on the platform on which
> the image is created.
Short answer: you
On 04/08/11 12:04, Gelonida N wrote:
> I posted already a question, but perhaps the subject line wasn't clear.
>
>
> Subject line was "Text to image with same results on any platform"
>
Oh, your original message was perfectly clear, and if I knew the answer,
I might have responded. Anyway, int
I posted already a question, but perhaps the subject line wasn't clear.
Subject line was "Text to image with same results on any platform"
>From within a django application
I'd like create a small image file (e.g. .png)
which just contains some text.
I wondered what library would be appropria
[PyNewbie]
Question: I can't seem to find the captured image, where does it go?
for me, it just goes to the current working directory:
$ python -i
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" fo
On 5/1/2011 9:00 PM, Chris Rebert wrote:
I would think to a file named "screen_capture.jpg" in the current
working directory. What that is for IDLE, I don't know.
At least on windows with 3.2, if one just starts up the shell, it is in
the Pythonxy directory. If one runs a file from an edit wi
On Sun, May 1, 2011 at 1:50 PM, PyNewbie wrote:
> Hi,
>
> I'm new with Python and PIL. I have a very simple question regarding an image
> capture function I'm attempting.
>
> Here is the code:
>
>
from PIL import ImageGrab
ImageGrab.grab().save("screen_capture.jpg", "JPEG")
>
> Question
Hi,
I'm new with Python and PIL. I have a very simple question regarding an image
capture function I'm attempting.
Here is the code:
>>> from PIL import ImageGrab
>>> ImageGrab.grab().save("screen_capture.jpg", "JPEG")
Question: I can't seem to find the captured image, where does it go? The
On 04/06/10 19:47, Peter Otten wrote:
> Tim Eichholz wrote:
>
>> I think maybe I am using the wrong function. I want to paste the
>> entire 192x192 contents of cols[f] into newimage. I would think it
>> works like newimage.paste(cols[f], (x, 0, 192+x, 192)) if that's not
>> it I think I'm missing
Tim Eichholz wrote:
> I think maybe I am using the wrong function. I want to paste the
> entire 192x192 contents of cols[f] into newimage. I would think it
> works like newimage.paste(cols[f], (x, 0, 192+x, 192)) if that's not
> it I think I'm missing a function
Don't "think"! Read the documentat
On Apr 6, 3:05 am, Peter Otten <__pete...@web.de> wrote:
> Tim Eichholz wrote:
> > I'm trying to cut a BMP with 80 adjacent frames down to 40 using the
> > Image.copy and .paste functions but I'm getting error "ValueError:
> > images do not match" on the paste line.
> > newimage.paste(cols[f], (f*f
Tim Eichholz wrote:
> I'm trying to cut a BMP with 80 adjacent frames down to 40 using the
> Image.copy and .paste functions but I'm getting error "ValueError:
> images do not match" on the paste line.
> newimage.paste(cols[f], (f*framew, 0, (f*framew)+192, 192))
The 4-tuple doesn't match the si
I'm trying to cut a BMP with 80 adjacent frames down to 40 using the
Image.copy and .paste functions but I'm getting error "ValueError:
images do not match" on the paste line.
Here is the source ---
import sys
from PIL import Image
if len(sys.argv) == 2:
file = sys.argv[1]
else:
p
The problem is likely to do with the line
picMap = [[0] * width ] * height
yeah the problem was with that specific line. The snippet from your link
worked by
replacing the previous declaration by
picMap = [[0] * 3 for x in xrange(height)]
Thanks,
-Sid
--
http://mail.python.org/mailman/listi
On Oct 20, 2:14 pm, Sid <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am tryin to copy an image into my own data structure(a sort of 2d array
> for further FFT). I've banged my head over the code for a couple of hours
> now. The simplified version of my problem is below.
>
> #-Code-
Hi,
I am tryin to copy an image into my own data structure(a sort of 2d array
for further FFT). I've banged my head over the code for a couple of hours
now. The simplified version of my problem is below.
#-Code
import Image
pic = Image.open("Images
On Aug 16, 3:53 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Casey wrote:
> > I'm doing some image processing that requires accessing the individual
> > pixels of the image. I'm using PIL 1.1.6 and creating a 2D array of
> > pixel RGB tuples using the Image class instance load() method.
>
> load
Casey wrote:
I'm doing some image processing that requires accessing the individual
pixels of the image. I'm using PIL 1.1.6 and creating a 2D array of
pixel RGB tuples using the Image class instance load() method.
load returns an access object that's attached to the image; to modify
the ima
I'm doing some image processing that requires accessing the individual
pixels of the image. I'm using PIL 1.1.6 and creating a 2D array of
pixel RGB tuples using the Image class instance load() method.
Unfortunately, I can't seem to find a reciprocal function that
converts the 2D array of RGB tupl
greg wrote:
I am able to use the PIL module to capture a screen or specific
window. My problem is when capturing a window (on windows XP) I can
only capture the "visible" portion of the window. Is there any way to
capture the entire window? specifically the scrolled portion of a
window that i
En Mon, 14 Jul 2008 12:11:55 -0300, greg <[EMAIL PROTECTED]> escribi�:
I am able to use the PIL module to capture a screen or specific
window. My problem is when capturing a window (on windows XP) I can
only capture the "visible" portion of the window. Is there any way to
capture the entire wi
On Jul 14, 11:11 am, greg <[EMAIL PROTECTED]> wrote:
> I am able to use the PIL module to capture a screen or specific
> window. My problem is when capturing a window (on windows XP) I can
> only capture the "visible" portion of the window. Is there any way to
> capture the entire window? specif
On Jul 14, 8:11 am, greg <[EMAIL PROTECTED]> wrote:
> Is there any way to capture the entire window? specifically
> the scrolled portion of a window that is _not_visible_on_the_screen_.
I don't think there is. That is why it is called a _screen_ capture.
Matt
--
http://mail.python.org/mailman/
I am able to use the PIL module to capture a screen or specific
window. My problem is when capturing a window (on windows XP) I can
only capture the "visible" portion of the window. Is there any way to
capture the entire window? specifically the scrolled portion of a
window that is not visible o
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] = ...
... = im
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.
> Ba
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 mak
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.
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 som
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
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
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
Fredrik Lundh wrote:
>
> it's explained in the documentation, of course:
>
> http://effbot.org/imagingbook/image.htm#Image.getdata
>
But as I read it, this gives me pixel values, i.e. colors. I want
palette indexes instead (which is what is really stored in a palette
image). I guess I can mak
[EMAIL PROTECTED] wrote:
> I want to do something very simple:
>
> I want to read a palette image (256 color PNG or BMP for instance), and
> then just to output the image data as numbers (palette indexes, I
> guess).
it's explained in the documentation, of course:
http://effbot.org/imaging
I want to do something very simple:
I want to read a palette image (256 color PNG or BMP for instance), and
then just to output the image data as numbers (palette indexes, I
guess). Makes sense? How do I do that?
/David
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno wrote:
>John Salerno wrote:
>
>
>>Diez B. Roggisch wrote:
>>
>>
>>
>>>Alternatively you can see it as boundary lines, in the order left,
>>>top, right, bottom.
>>>
>>>(10, 20, 30, 100)
>>>
>>>
>>So in the above, from where are the numbers being counted? 10 is ten
>>pixel
Yes
John Salerno wrote:
> John Salerno wrote:
>> Diez B. Roggisch wrote:
>>
>>> Alternatively you can see it as boundary lines, in the order left,
>>> top, right, bottom.
>>>
>>> (10, 20, 30, 100)
>>
>> So in the above, from where are the numbers being counted? 10 is ten
>> pixels from the l
John Salerno wrote:
> Diez B. Roggisch wrote:
>
>> Alternatively you can see it as boundary lines, in the order left,
>> top, right, bottom.
>>
>> (10, 20, 30, 100)
>
> So in the above, from where are the numbers being counted? 10 is ten
> pixels from the left border of the image? 20 is twenty
Diez B. Roggisch wrote:
> Alternatively you can see it as boundary lines, in the order left, top,
> right, bottom.
>
> (10, 20, 30, 100)
So in the above, from where are the numbers being counted? 10 is ten
pixels from the left border of the image? 20 is twenty pixels from the
top border? But
John Salerno wrote:
>I might be way off target even looking into this method for what I need
>to do, but I'm still a little confused about the description of it:
>
>crop
>im.crop(box) => image
>
>Returns a rectangular region from the current image. The box is a
>4-tuple defining the left, upper,
John Salerno schrieb:
> I might be way off target even looking into this method for what I need
> to do, but I'm still a little confused about the description of it:
>
> crop
> im.crop(box) => image
>
> Returns a rectangular region from the current image. The box is a
> 4-tuple defining the lef
I might be way off target even looking into this method for what I need
to do, but I'm still a little confused about the description of it:
crop
im.crop(box) => image
Returns a rectangular region from the current image. The box is a
4-tuple defining the left, upper, right, and lower pixel coord
On Thursday 13 October 2005 02:58 pm, Andrea Gavana wrote:
> # that is the old colour --> GREY
> rgb_old = (0.7, 0.7, 0.7)
>
> So, no matter what colour I choose as a "new" colour, the
Hue part of the new colour doesn't change in RGB. In other
words, leaving the old value for "Saturation" and "Va
Hello Terry,
> new_hue # your 'basic color',
just the hue part> rgb_base # color from the basic button
image> rgb_new # the new color you want to replace rgb_base
with> > rgb_new = hsv_to_rgb( (new_hue,) +
rgb_to_hsv(rgb_base)[1:])
thanks a lot for your
suggestion! However, eithe
Try this:
>>> import colorsys as cs
>>> grey = (.7, .7, .7)
>>> blue = (0., 0., 1.)
>>> hsv_grey = cs.rgb_to_hsv(*grey)
>>> hsv_blue = cs.rgb_to_hsv(*blue)
>>> hsv_grey
(0.0, 0.0, 0.69996)
>>> hsv_blue
(0.3, 1.0, 1.0)
The problem is that the saturation of the gr
Andrea Gavana wrote:
> I have tried your solution, Terry:
>
> > new_hue # your 'basic color', just the hue part
> > rgb_base # color from the basic button image
> > rgb_new # the new color you want to replace rgb_base with
> >
> > rgb_new = hsv_to_rgb( (new_hue,) + rgb_to_hsv(rgb_base)[1:])
>
I have tried your solution, Terry:
> new_hue # your 'basic color', just the hue part
> rgb_base # color from the basic button image
> rgb_new # the new color you want to replace rgb_base with
>
> rgb_new = hsv_to_rgb( (new_hue,) + rgb_to_hsv(rgb_base)[1:])
thanks a lot for your suggestion!
If you're always going from grey to tinted, then the easiest way is to
treat it as a 'P' image with a special palette.
I believe this function will prepare the palette:
def make_palette(tr, tg, tb):
l = []
for i in range(255):
l.extend([tr*i / 255,
On Wednesday 12 October 2005 05:28 pm, Andrea Gavana wrote:
> Now my question: is it possible to transform the pixels
colours in order to have another basic colour (say blue)?
In other words, the predominant colour will become the
blue, with other pixels in a brighter or darker blue to
give the
Hello NG,
First of all, sorry if this is not the right
newsgroup.
I have a small image that looks like a GUI button
(with 3D effects given by different pixels colours). The current image has as
"basic" colour the grey. For "basic", I mean that the predominant colour in the
image is grey
Try Image.new in place of Image.Image if you want to build a new image.
At which level are you?
CyrilOn 14 Aug 2005 10:34:38 -0700, Ray <[EMAIL PROTECTED]> wrote:
Hello,I'm using latest PIL version with Python 2.4.1. (for solving a level inPython Challenge actually...). Anyway, I'm trying to draw
"Ray" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
>
> image = Image.Image()
>
> Anybody has any idea why this is the case?
>
Image.Image() isn't the way to get a new image object in PIL. Try
Image.new(), which needs at least mode and size arguments. You can get
those from your ori
On Sunday 14 August 2005 12:34 pm, Ray wrote:
> import Image
>
> im = Image.open("something.jpg")
> seq = im.getdata()
>
> image = Image.Image()
> image.putdata(seq)
>
> image.show()
>
> I always get:
>
> Traceback (most recent call last):
> File "Script1.py", line 31, in ?
> image.putda
Hello,
I'm using latest PIL version with Python 2.4.1. (for solving a level in
Python Challenge actually...). Anyway, I'm trying to draw a picture. My
question is, why is it that putdata() won't work? Even this won't run:
import Image
im = Image.open("something.jpg")
seq = im.getdata()
image =
Ilpo Nyyssönen napisał(a):
>>>Is there any way of keeping this info in PIL?
>>
>>I don't think so... when I investigated in the past, I think I
>>discovered that the PIL can't write EXIF data (I might be wrong,
>>though, or my information might be outdated).
>
> There is this:
>
> http://mail.py
"Will McCutchen" <[EMAIL PROTECTED]> writes:
>> Is there any way of keeping this info in PIL?
>
> I don't think so... when I investigated in the past, I think I
> discovered that the PIL can't write EXIF data (I might be wrong,
> though, or my information might be outdated).
There is this:
http:
> Is there any way of keeping this info in PIL?
I don't think so... when I investigated in the past, I think I
discovered that the PIL can't write EXIF data (I might be wrong,
though, or my information might be outdated).
> Alternatively, is there a simple image
> processing package that does it?
A question on using the PIL library. If I take a jpg file then, say, resize it
and save it
somewhere else, all metadata that is part of the jpg file is lost. This is a
pity: digital
cameras routinely add metainformation, so does, for example, Photoshop.
Is there any way of keeping this info in P
How am I able to draw a sting with some angle on image?
--
http://mail.python.org/mailman/listinfo/python-list
62 matches
Mail list logo