cocobear wrote:
On Jul 29, 9:20 am, cocobear <cocobear...@gmail.com> wrote:
Thistwopngfile has their own palette

im1.mode
'P'
im.mode
'P'
im.getpalette == im1.getpalette
False

I can use this code tomergetwopngpictogether:

Map = Image.new("RGB", (x,y))
Map.paste(im, box)
Map.paste(im1,box)

Map = Map.convert("L", optimize=True, palette=Image.ADAPTIVE)

But if thetwopngpicis too big , or if I have tomergemorepic
together, I will get MemoryError:

Image.new("RGB",(44544,38656))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/PIL/Image.py", line 1710, in
new
    return Image()._new(core.fill(mode, size, color))
MemoryError

How can I directlymergetwopicto a ‘P' modepngwith palette.


Nobody replied.

A. Leavingoutspacesmakesyourposthardtoread.

B. Nobody knows how to avoid mem error.

tjr


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to