ARTiledImageView icon indicating copy to clipboard operation
ARTiledImageView copied to clipboard

Custom zoom step

Open bibinjacobpulickal opened this issue 7 years ago • 9 comments

I created a project that requires to load webp tiled images from server and render it on catiledlayer. But, I'm facing a huge performance issue while zooming and panning. A lib in android named tileview has really good performance. I tried using your library on a new project. But, I'm stuck at two places. 1. Loading webp images from url. 2. Tiles available only at 4x zoom steps instead of 2x. Please, help me achieve this.

bibinjacobpulickal avatar Sep 18 '17 06:09 bibinjacobpulickal

Please take a look into this repository that I've created. It uses this library. I've added a webp decoder extension. The images are being returned. But the issue is, I need the image to start from lowest zoom level and zoom into 4x zoom levels. ie., 4x comes after 1x, 16x comes after 4x. So, if resolution of image at 1x is 25x25, next level would be 100x100, then 400x400 so on.. Could you please help me??

bibinjacobpulickal avatar Sep 18 '17 08:09 bibinjacobpulickal

Not sure I have a lot of time to play with this. Is the zoom not working? What's the actual problem? What do you expect and what are you seeing?

Is the performance problem because of JPEG and that's why you're adding webp support?

Unrelated, what is the code that you had to add to support webp? Maybe PR that into this project with some tests and documentation so that we can turn that into something maintainable and in exchange you can get some help on your feature :)

dblock avatar Sep 18 '17 16:09 dblock

Performance issue is not because of webp, I've tested. Problems that I face are:

  1. When I run this project I see, that the view is loaded at maximum zoom level. I want the image to be at minimum zoom level at the beginning. i tried setting zoomscale but it doesn't work.
  2. Tiled images are only available at alternate zoom levels. Usual transition is 1x,2x,4x,8x... but i require 1x,4x,16x...
  3. Also is it possible to set a tile layer image as background image for scroll view (maybe, rendering a layer with just a handful of tiles)?

bibinjacobpulickal avatar Sep 18 '17 16:09 bibinjacobpulickal

I added the webpdecoder framework provided by google here is the link.Also, added a small extension to UIImage for convenience. You could take a look on my repository. I use webp format for images because they are really low in size. 512x512 can stored in 4-10kb hence, the network load is less. Also, webp format has a lossless compression unlike jpg.

bibinjacobpulickal avatar Sep 18 '17 17:09 bibinjacobpulickal

There're 3 separate issues here. You should turn this issue into one of them and open separate issues for everything else.

Unfortunately nobody here has time to integrate your webp support or to spend a lot of time debugging your app, however you can help us by making pull requests even for small things, I encourage you to do so.

dblock avatar Sep 18 '17 17:09 dblock

Okay, the major issue that I face is, converting the zoom step from 2x to 4x.

bibinjacobpulickal avatar Sep 18 '17 17:09 bibinjacobpulickal

I've been trying to skip level 12 between 11 and 13 in your Armory2014 sample project. But, I can't get it to work. Could you help me with this?

bibinjacobpulickal avatar Sep 19 '17 10:09 bibinjacobpulickal

Unfortunately I don't have any time to do this quickly, no promises, sorry.

dblock avatar Sep 19 '17 13:09 dblock

Just in case you get some time, please have a look I made a project with this repository. The issue is performance is very poor (rendering speed, initial rendering time is very high). He has made a Custom Tile Provider maybe you could understand the logic used. I tried using the same. But, it's not working yet.

bibinjacobpulickal avatar Sep 26 '17 08:09 bibinjacobpulickal