On Tuesday, 7 April 2015 15:43:44 UTC-7, kai.p...@gmail.com wrote:
> I just wrote this bit (coming from Pascal) and am wondering how seasoned
> Python programmers would have done the same? Anything terribly non-python?
>
> As always, thanks for all input.
>
> K
>
>
>
> """
> Creates a PNG i
I just wrote this bit (coming from Pascal) and am wondering how seasoned Python
programmers would have done the same? Anything terribly non-python?
As always, thanks for all input.
K
"""
Creates a PNG image from EPD file
"""
import os, sys
from PIL import Image, ImageFont, ImageDraw
#
Last week some readers have kindly supplied ideas and code for a question I had
asked around a form of image data compression required for specialized display
hardware.
I was able to solve my issues for all but one:
The black & white only device (1024 (X) x 1280 (Y)) expects the compressed dat
On Wednesday, 25 March 2015 20:54:21 UTC-7, kai.p...@gmail.com wrote:
> I create an image as per:
>
> img = Image.new('1', (1024, 1280), 1)
>
> I then draw on it and do:
>
> imagedata = list(img.getdata())
> print len(imagedata)
>
> This gives me 1228800 instead of the expec
I create an image as per:
img = Image.new('1', (1024, 1280), 1)
I then draw on it and do:
imagedata = list(img.getdata())
print len(imagedata)
This gives me 1228800 instead of the expected 1310720 (1024 * 1280)
- any ideas what I am missing?
As always, any help much
On Wednesday, 25 March 2015 18:10:00 UTC-7, Paul Rubin wrote:
> nobody writes:
> > I though that the bytes type is Python 3 only? If so, I cannot use it.
>
> In Python 2, the regular string type (str) is a byte vector, though it
> is immutable. Do you send one scan line at a time to the renderin
On Tuesday, 24 March 2015 20:14:06 UTC-7, otaksoft...@gmail.com wrote:
> I have a list containing 9600 integer elements - each integer is either 0 or
> 1.
>
> Starting at the front of the list, I need to combine 8 list elements into 1
> by treating them as if they were bits of one byte with 1 a
On Tuesday, 24 March 2015 20:14:06 UTC-7, otaksoft...@gmail.com wrote:
> I have a list containing 9600 integer elements - each integer is either 0 or
> 1.
>
> Starting at the front of the list, I need to combine 8 list elements into 1
> by treating them as if they were bits of one byte with 1 a
On Tuesday, 24 March 2015 21:20:11 UTC-7, Chris Angelico wrote:
> On Wed, Mar 25, 2015 at 3:04 PM, Paul Rubin wrote:
> > This works for me in Python 2.7 but I think
> > Python 3 gratuitously broke tuple unpacking so it won't work there:
> >
> >
On Tuesday, 24 March 2015 21:04:37 UTC-7, Paul Rubin wrote:
> nobody writes:
> > I have a list containing 9600 integer elements - each integer is
> > either 0 or 1.
>
> Is that a homework problem? This works for me in Python 2.7 but I think
> Python 3 gratuitously broke tuple unpacking so it won
On Tuesday, 24 March 2015 13:15:42 UTC-7, Ian wrote:
> On Tue, Mar 24, 2015 at 1:52 PM, Kai wrote:
> > Judging from the message archive, the image-sig list is (just about) dead?
> >
> > Disclaimer: Am a newbie - so anything is possible
> >
> >
> > using 'RGB' works fine
> >
> > img = Image.ne
Judging from the message archive, the image-sig list is (just about) dead?
Disclaimer: Am a newbie - so anything is possible
using 'RGB' works fine
img = Image.new('RGB', (inktile[0], inktile[1]), bgcolor)
using '1' or 'L' does not (see trace below)
img = Image.new('L', (inktile[0]
> >> > Given
> >> >
> >> > data =
> >> > '{[][]}'
> >> >
> >> > How can I efficiently get dictionaries for each of the data blocks
> >> > framed by <> ?
> >> >
> >> > Thanks for any help
> >>
> >> The question here is: What _can't_ happen? For instance, what happens
> >> if Fred's name contains
> > Given
> >
> > data =
> > '{[][]}'
> >
> > How can I efficiently get dictionaries for each of the data blocks framed
> > by <> ?
> >
> > Thanks for any help
>
> The question here is: What _can't_ happen? For instance, what happens
> if Fred's name contains a greater-than symbol, or a caret?
Given
data = '{[][]}'
How can I efficiently get dictionaries for each of the data blocks framed by <>
?
Thanks for any help
KP
--
https://mail.python.org/mailman/listinfo/python-list
15 matches
Mail list logo