Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Study spaces maps are low res #131

Open
zipy124 opened this issue Apr 4, 2019 · 7 comments
Open

Study spaces maps are low res #131

zipy124 opened this issue Apr 4, 2019 · 7 comments
Labels
enhancement New feature or request

Comments

@zipy124
Copy link
Member

zipy124 commented Apr 4, 2019

As far as i'm aware we get SVG's but they show extremely low res eve upon zooming in the app. the writing on them is un-readable.

@hueyy
Copy link

hueyy commented Apr 4, 2019

IIRC they're not true SVGs in that they embed a PNG with the colourful dots overlayed on top. We could solve this by vectorising our floor maps, which is something @anushks has attempted to do.

@anushks
Copy link

anushks commented Apr 4, 2019

Hi yes it takes forever LOL

@zipy124
Copy link
Member Author

zipy124 commented Apr 4, 2019

ahh, this would explain it i guess

@ChristopherHammond13
Copy link

Yeah these maps come from the OccupEye API. I'm not sure if there's a way to get higher resolution ones, but I can investigate this

@Feverfew
Copy link

We can use one of these solutions: https://stackoverflow.com/questions/1861382/how-to-convert-a-png-image-to-a-svg
First two images are free for vectormagic so we can see if it's worth paying for (or asking OccupEye to pay for it instead of us, or learn how to design an SVG).

Others are programmatic which is nice (i.e. might be able to do this automatically API side).

@Feverfew
Copy link

Feverfew commented May 6, 2020

Via convert map.png -colorspace gray -threshold 94% map.pbm && potrace map.pbm -s -a 0 on Ubuntu 20.04 I managed to get a not too bad conversion. Can't upload on GitHub unfortunately, but would appreciate if someone else could tinker to see what's the best possible combination here.

@hueyy
Copy link

hueyy commented May 26, 2020

convert map.png -colorspace gray -threshold 94% map.pbm && potrace map.pbm -s -a 0 produces this:

map1

I fiddled around a bit, but didn't manage to produce anything substantially better.

pypotrace seems like an easy way to do this programmatically, perhaps just before we cache the images in redis.

vectormagick appears to produce similar results, so might not be worth paying for
image

@hueyy hueyy added the enhancement New feature or request label May 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants