Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dream - Support GDAL tools #12

Open
ambs opened this issue Jul 30, 2018 · 8 comments
Open

Dream - Support GDAL tools #12

ambs opened this issue Jul 30, 2018 · 8 comments

Comments

@ambs
Copy link

ambs commented Jul 30, 2018

Unfortunately image magick does not work when a dimension is larger than 30000 pixels.
GDAL tools seem to support bigger raster files, but the interface is different from convert.
I am trying to understand how can I tweak your great script to use them.
Cheers!

EDIT: I have portions of the script working with gdalinfo and gdal_translate. But they are tuned for my standard use case, and would need work for other cases. Anyway, would be happy to share them.

http://eremita.di.uminho.pt/~ambs/panoramics/0013-vez/index.html

@VoidVolker
Copy link
Owner

Hi! Image magick does work with big images. I have converted successfully image with size 19469x5000.

@ambs
Copy link
Author

ambs commented Aug 17, 2018

Sorry, it was a typo. More than 30K width.

@VoidVolker
Copy link
Owner

VoidVolker commented Aug 17, 2018

Sorry, more 30k requires changes in script - looks like issue in 32 bit calculations in shell math. May be in some modern shell versions it can works.

@ambs
Copy link
Author

ambs commented Aug 17, 2018

Not sure how shell math is handling it. But swapping from imagemagick to gdal_translate was enough for now.

0033-vila_nova_milfontes/image.jpg JPEG 32327x2796 32327x2796+0+0 8-bit sRGB 15.74MB 0.000u 0:00.000

Result here: http://eremita.di.uminho.pt/~ambs/panoramics/0033-vila_nova_milfontes/index.html
But yes, this one is still bellow the (2^16)/2 limit. But in the other hand, shell math looks good:

echo $((30000 + 30000 * 2))
90000

Best

@VoidVolker
Copy link
Owner

Hm, maybe. There in code image sizes is multiply to get more accurate sizes for new images. Right now I don't remember details, sorry - need deep script debug.

@ambs
Copy link
Author

ambs commented Aug 17, 2018

No stress. For me, for now, all working good. Just though it would be nice to share.

@VoidVolker
Copy link
Owner

Thank you! Can you share code parts for GDAL tools? I'll add it to script.

@ambs
Copy link
Author

ambs commented Aug 17, 2018

I do not have everything working. Here goes my current script. -- https://gist.github.com/ambs/0c55e775ed27584e2d798017e8d7babc

Note that GDAL tools does not like small files, so this script uses gdal tools in some places, and image magick in others. Also, the tile funcionality from imagemagick is not available, thus I needed to create two loops and crop manually the image.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants