merge two png pic

News123 news123 at free.fr
Tue Aug 4 03:24:57 EDT 2009


Hi,

cocobear wrote:

>> > >> 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))
>>
>> What do you want to do with such a big image? You will run into the same
>> limitation when you are trying to display it.
>>
> 
> I want to download a map from google map with high precision
> 


For me it sounds strange to handle such big files.

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.

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.

Being no expert of PIL I don't know whether this is easily possible though?


bye


N



More information about the Python-list mailing list