Re: merge two png pic



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:
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.


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

.



Relevant Pages

  • Re: merge two png pic
    ... than you can probably store in RAM ... I don't familiar with PPM, photoshop don't support PPM, ... I want to download a map from google map with high precision ... Mostly Google maps uses normally tiles of sizes 256x256 pixel, ...
    (comp.lang.python)
  • Re: [OT] Documentation for PC Architecture
    ... > physical RAM? ... > If you use the MMU to map a virtual address to the physical addresses from ... things like AT-PS/2 keyboard (do you have USB keyboard? ... the programs write to the current console... ...
    (Linux-Kernel)
  • Re: KITL ethernet driver in windows CE 6.0 fails
    ... you can't map in the entire 512MB of RAM. ... But is there any way I can map 0x50100000 physical ... using memory base to access my hardware. ... KITL routines are hardcoded to use Physical addresses. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Making of zoomable webpage?
    ... Google Map would work in an I-frame. ... wants as I don't know if you can add "star location links" to an imported ...
    (microsoft.public.publisher.webdesign)
  • Re: Opteron box and 4Gb memory
    ... Board is a SuperMicro H8DCE. ... Seems odd if they can't just map memory as: ... Where did they map the rest of the ram? ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)