Piramides zoom level
How i can set custom number of layout for generated piramides? I want get more then lib can get by default. I know that not same algorithm need , for this need resize image. Found one or two people who wanted same 2 years ago. But nod found result.
This lib incredible faster and not use huge resources for make tiles. Another script they i use eat 4+ gb of ram and 1 core for several minutes. This make same for ten seconds and can make it on cheap shared hosting without reach resources limit.
Hi @FridayJew, can you explain the behaviour you need?
Show a sample input image, desired output, and the operations you have tried to use.
Hi @FridayJew, can you explain the behaviour you need?
Show a sample input image, desired output, and the operations you have tried to use.
I want get in last layout tiles them 1 pixel of big image was 4 or 16 pixel of tile image. For more zoom level and clear view.
Yes, it should do that -- in the default mode, it'll shrink to 1 pixel tiles.
john@kiwi:~/pics$ vipsheader k2.jpg
k2.jpg: 1450x2048 uchar, 3 bands, srgb, jpegload
john@kiwi:~/pics$ vips dzsave k2.jpg x
john@kiwi:~/pics$ vipsheader x_files/0/0_0.jpeg
x_files/0/0_0.jpeg: 1x1 uchar, 3 bands, srgb, jpegload
You need to explain what behaviour you need and what commands you've tried to use.
i use this functions:
$im = vips_image_new_from_file('./big_image.png')["out"]; //, ['access' => 'sequential'];
vips_call('dzsave', $im, './folder', ["overlap" => 0, "tile-size" => 256, "depth" => "onetile", "layout" => "google", "suffix" => ".png"]);
And get in last layout tiles with 1px big image = 1px tile image. I want make more than last levels. Tiles on them will be have cut and resized image. Like last layer tile height x2 and cut them on more 4 tiles.
I also found if use in this function parameter "skip_blanks" => 0 this don't work.
Try "depth" => "onepixel".
skip_blanks should work. You'll need to post an example of it failing.
Try
"depth" => "onepixel".
This is make more levels for another way. I want more to + zoom. https://imgur.com/a/JN2oodX
skip_blanksshould work. You'll need to post an example of it failing.
I have -1 from function if use them. Maybe i use them wrong or library in php 7.4 too old ?
echo vips_call('dzsave', $im, './folder', ["overlap" => 0, "tile-size" => 256, "depth" => "onetile", "layout" => "google", "suffix" => ".png", "skip_blanks" => 0 ]);
this version install on hosting:
Vips headers version | 8.5.6
Vips library version | 8.5.6
Vips ABI version | 49.5.7
Oh, you want more detailed levels?
You could enlarge the image before making the pyramid. Is this a vector source, like SVG, or are you trying to pyramid a bitmap?
Yes, skip_blanks is a more recent feature. libvips 8.5 is from 2016.
Oh, you want more detailed levels?
You could enlarge the image before making the pyramid.
Maybe i can make one layer for 2x image, calculate how much folders, rename for last and save this is in folder for other tiles. I want options for make it ease.