Re: merge two png pic
- From: News123 <news123@xxxxxxx>
- Date: Wed, 05 Aug 2009 09:44:18 +0200
You didn't really tell us why you need one big file, which contains more
pixel, than you can probably store in RAM
Is it for printing?
Not knwoing your goal makes it difficult to suggest solutions.
Can't you use other image formats like raw RGB or
What other image formats are supported?
tiff? Raw? PPM ( http://en.wikipedia.org/wiki/Portable_pixmap )?
concatenating raw/ppm files with the same width would be really trivial.
so you could use python to create horizontal raw/ppm stripes.
then you could concatenate them without having to have the whole image
in RAM.
Perhaps there's even converters from ppm to png, that don't need the
whole image in RAM.
cocobear wrote:
On Aug 4, 3:24 pm, News123 <news...@xxxxxxx> wrote:.
Hi,
cocobear wrote:
For me it sounds strange to handle such big files.I want to download a map from google map with high precisionWhat do you want to do with such a big image? You will run into the sameMap = 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))
limitation when you are trying to display it.
Is the map you download from Google really that big?
Mostly Google maps uses normally tiles of sizes 256x256 pixel, wich you
have to compose to get the big image.
The map I downloaded from Google is small(256x256). These small maps
will compose a big image.
If your problem is to combine tiles with different palettes, then you
should pobably look at a way to 'unify' the palette of all tiles befor
combining them.
I think it is impossible to 'unify' all this tiles.
Being no expert of PIL I don't know whether this is easily possible though?
bye
N
- Follow-Ups:
- Re: merge two png pic
- From: cocobear
- Re: merge two png pic
- References:
- Re: merge two png pic
- From: cocobear
- Re: merge two png pic
- From: News123
- Re: merge two png pic
- From: cocobear
- Re: merge two png pic
- Prev by Date: Re: Turtle Graphics are incompatible with gmpy
- Next by Date: Re: Using Python to automate builds
- Previous by thread: Re: merge two png pic
- Next by thread: Re: merge two png pic
- Index(es):
Relevant Pages
|