progweb / gpx2video

Creating video with telemetry overlay from GPX data
GNU General Public License v3.0
175 stars 10 forks source link

[BUG] PNG Does not Support Tiles #34

Open pyramid3d opened 4 months ago

pyramid3d commented 4 months ago

The bug When running the command given in raedme: ./gpx2video -g 20240601.gpx -o map.png --map-source=1 --map-zoom=11 --map-factor 2.0 map I get the following bug from OpenImageIO:

Build map... width = 512 height = 512 Tiles are not supported TILESIZE = 256 ERROR: Build map failure, can't open 'map.png' file error = png does not support tiled images

To Reproduce Add this code in map.cpp, lines 573++ std::unique_ptr out = OIIO::ImageOutput::create("map.png"); OIIO::ImageSpec outspec(width, height, 4); if (!out->supports("tiles")) { std::cerr << "Tiles are not supported" << "\n"; }

Expected behavior Convincing the code to use .tif format works fine. std::unique_ptr out = OIIO::ImageOutput::create("map.tif");

Desktop (please complete the following information): Linux 6.8.9-arch1-2 #1 SMP PREEMPT_DYNAMIC Tue, 07 May 2024 21:35:54 +0000 x86_64 GNU/Linux

Additional context

pacman -Ss openimageio

extra/openimageio 2.5.10.1-1 [installed]

progweb commented 4 months ago

I don't think that it's the good issue.

Indeed, PNG doesn't support "tiles". But OpenImageIO emulates it by buffering the whole image.

Can you try the code:

if (out->open(filename_, outspec) == false) {
   std::cerr << out->geterror();
...