voidvolker / magickslicer Goto Github PK
View Code? Open in Web Editor NEWMap tiles generator
License: MIT License
Map tiles generator
License: MIT License
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
Default (-a), after 14 sub-folders with 0_0.png images, it stopped and threw:
./magick-slicer.sh heightmap.png
convert-im6.q16: cache resources exhausted `heightmap.png' @ error/cache.c/OpenPixelCache/4083.
convert-im6.q16: cache resources exhausted `heightmap_files/13.png' @ error/cache.c/OpenPixelCache/4083.
convert-im6.q16: No IDATs written into file `heightmap_files/13.png' @ error/png.c/MagickPNGErrorHandler/1641.
convert-im6.q16: no images defined `heightmap_files/13/%[filename:tile].png' @ error/convert.c/ConvertImageCommand/3258.
convert-im6.q16: cache resources exhausted `heightmap_files/14.png' @ error/cache.c/OpenPixelCache/4083.
convert-im6.q16: No IDATs written into file `heightmap_files/14.png' @ error/png.c/MagickPNGErrorHandler/1641.
convert-im6.q16: no images defined `heightmap_files/14/%[filename:tile].png' @ error/convert.c/ConvertImageCommand/3258.
It' s PC tower running on Ubuntu 20.04 with 16GB RAM and free disk space, i5 CPU and GTX970 GC.
Any idea?
More verbose
/magick-slicer.sh -v3 -b heightmap.png
Parsing key: -b
Parsing key: heightmap.png
Section: Functions
Section: Slicer A
Section: Slicer B
Section: Programm
Slicer B is running...
Slicing zoom level "0"; image main size is "256"
Slicing zoom level "1"; image main size is "512"
Slicing zoom level "2"; image main size is "1024"
Slicing zoom level "3"; image main size is "2048"
Slicing zoom level "4"; image main size is "4096"
convert-im6.q16: cache resources exhausted `heightmap.png' @ error/cache.c/OpenPixelCache/4083.
convert-im6.q16: cache resources exhausted `heightmap_files/4.png' @ error/cache.c/OpenPixelCache/4083.
convert-im6.q16: No IDATs written into file `heightmap_files/4.png' @ error/png.c/MagickPNGErrorHandler/1641.
convert-im6.q16: no images defined `heightmap_files/4/%[filename:tile].png' @ error/convert.c/ConvertImageCommand/3258.
Slicing zoom level "5"; image main size is "8192"
convert-im6.q16: cache resources exhausted `heightmap.png' @ error/cache.c/OpenPixelCache/4083.
convert-im6.q16: cache resources exhausted `heightmap_files/5.png' @ error/cache.c/OpenPixelCache/4083.
convert-im6.q16: No IDATs written into file `heightmap_files/5.png' @ error/png.c/MagickPNGErrorHandler/1641.
convert-im6.q16: no images defined `heightmap_files/5/%[filename:tile].png' @ error/convert.c/ConvertImageCommand/3258.
Slicer B complete
I used a square input file of exactly 2^13, and sliced with no command-line arguments. I got a file structure with folders 0...14, with a 128x128 image in 8/ and a single 256x256 image in 9/. Openseadragon seemed to expect that the image in 8 would be 256x256 and 9 would contain four tiles. I "fixed" by hacking the .dzi file to say the full image size was 8193x8193, or (better!), by removing folder 0/ and renaming all the other folders n/ => n-1/
Hi
I am currently testing magickSlicer for converting large jpeg files to DZI. It works nice.
However, i am facing a problem with the size of rendered DZI. For exemple, for an orginal jpeg file weighting 10Mo, the rendred DZI folder weight 26.2Mo with default option (-w 256 -h 256).
If I change options width and height to 512x512 the DZI folder weight 18.3Mo. It is yet too big because I have to deal with a huge repository of large files.
I wish to know how can I manage options of conversion for getting a DZI folder weighting less or equals to the weight of original files.
Best regards.
Could this converted to a php version?
Hi
What is the largest we can go using this tool?
I have a 121 095 x 52 585 pixel image I am trying to convert
It seems to get stuck at level 4 of the zoom tiles
I tried smaller files and they work great
Specified in pixels. Default should be 1. Default tileSize should be 254.
Overlap is added to the size of a tile. So, a middle tile (with neighbors on all sides) with a tileSize of 254 and an overlap of 1 would have an actual size of 256 (254 + 1 for each side). A tile on the edge (with only 1 neighbor) would have an actual size of 255 (254 + the one neighbor side).
Each overlap row or column is basically taken from the side of the neighboring tile. It's like you sliced all the tiles up without overlap, but then just added rows and columns of pixels from each neighboring tile.
Hello,
i've download magick-slicer.sh and made chmod +x
When i launch sh magick-slicer.sh DJI_0001.jpg i have response ๐
magick-slicer.sh: 418: [[: not found
No source file present. Canceled.
Without any arg response is ok
mycount@mycount-desktop:/media/4T2M/tvix/www/privft/cportail/ExhibMyDrone/PanoDrone/openseadragon-bin-2.4.2/testimg$ sh magick-slicer.sh
Map tiles generator. License: MIT.
Version: 0.004
Date: 05/08/2015
Usage:
magick-slicer.sh -u|--usage
magick-slicer.sh -?|--help|-m|--man [option_name]
magick-slicer.sh [options] [-i] /source/image [[-o] result/dir]
magick-slicer.sh /source/image [options] [result/dir]
magick-slicer.sh /source/image [result/dir] [options]
Use quotes for path or options with spaces. First unknown string interpreting as source image, if it not defined. Second unknown string is interpreting as result path, if it not defined. Also, for source and result you can use options '-i' and '-o'.
Options list:
-?, --help [option]
-m, --man
[ -v, --verbose <level> ]
[ -v0, -v1, -v2, -v3 ]
[ -i, --in <file_path> ]
[ -o, --out <directory_path> ]
[ -e, --extension <file_extesion> ]
[ -w, --width <tile_width> ]
[ -h, --height <tile_height> ]
[ -s, --step <zoom_step_value> ]
[ -p, --options 'imagemagick options string']
[ -g, --gravity <type> ]
[ -x, --extent ]
[ -d, --dzi ]
[ -a, --slicea ]
[ -b, --sliceb ]
[ -c, --scaleover ]
[ -r, --horizontal ]
[ -t, --vertical ]
I use ubuntu 20.04 with default GNOME Shell 3.36.9
Have you a idea for resolve this ?
Thank by advance
Normally not really visible, I think this is only exaggerated on the diagonal lines we have on the image itself.
Have tried multiple options but every set of images appears to result in the same thing happening. Any ideas?
This is in use with Open Sea Dragon, and effect is only visible when zoomed it at least 5 times.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.