add 'tiff' output to python/c++ demos
This commit is contained in:
parent
68356d5d4e
commit
40da9e5618
2 changed files with 8 additions and 2 deletions
|
@ -253,12 +253,15 @@ int main ( int argc , char** argv)
|
|||
save_to_file<image_data_32>(buf.data(),"demo.jpg","jpeg");
|
||||
save_to_file<image_data_32>(buf.data(),"demo.png","png");
|
||||
save_to_file<image_data_32>(buf.data(),"demo256.png","png256");
|
||||
save_to_file<image_data_32>(buf.data(),"demo.tif","tiff");
|
||||
|
||||
std::cout << "Three maps have been rendered using AGG in the current directory:\n"
|
||||
"- demo.jpg\n"
|
||||
"- demo.png\n"
|
||||
"- demo256.png\n"
|
||||
"- demo.tif\n"
|
||||
"Have a look!\n";
|
||||
|
||||
|
||||
#if defined(HAVE_CAIRO)
|
||||
Cairo::RefPtr<Cairo::ImageSurface> image_surface;
|
||||
|
||||
|
|
|
@ -322,7 +322,7 @@ m.layers.append(popplaces_lyr)
|
|||
# Set the initial extent of the map in 'master' spherical Mercator projection
|
||||
m.zoom_to_box(mapnik.Box2d(-8024477.28459,5445190.38849,-7381388.20071,5662941.44855))
|
||||
|
||||
# Render two maps, two PNGs, one JPEG.
|
||||
# Render map
|
||||
im = mapnik.Image(m.width,m.height)
|
||||
mapnik.render(m, im)
|
||||
|
||||
|
@ -347,6 +347,9 @@ images_.append('demo_high.jpg')
|
|||
im.save('demo_low.jpg', 'jpeg50')
|
||||
images_.append('demo_low.jpg')
|
||||
|
||||
im.save('demo.tif', 'tiff')
|
||||
images_.append('demo.tif')
|
||||
|
||||
# Render cairo examples
|
||||
if HAS_PYCAIRO_MODULE and mapnik.has_pycairo():
|
||||
|
||||
|
|
Loading…
Reference in a new issue