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

OpenLayers3 Image gets squashed on some Tablets and phones. #8

Open
ahb108 opened this issue Apr 11, 2014 · 1 comment
Open

OpenLayers3 Image gets squashed on some Tablets and phones. #8

ahb108 opened this issue Apr 11, 2014 · 1 comment

Comments

@ahb108
Copy link
Contributor

ahb108 commented Apr 11, 2014

This seems to happen on certain Apple devices. For example, the skewed image below:

img_0027

@ahb108 ahb108 changed the title OpenLayers3 Image displays badly on some Tablets and phones. OpenLayers3 Image gets squashed on some Tablets and phones. May 8, 2014
@ahb108
Copy link
Contributor Author

ahb108 commented May 8, 2014

Scaling large images (decoded image sizes of several megapixels or more) on an iOS device can lead to them being rendered as very squashed because of the way they potentially are sub-sampled by iOS. See:

https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariWebContent/CreatingContentforSafarioniPhone/CreatingContentforSafarioniPhone.html#//apple_ref/doc/uid/TP40006482-SW15

This is what currently happens for the photo-masking application (but not the index card scans because the latter are small enough). I have checked and if the photomasking image is made smaller, the problem goes away. On an iOS device, compare:

http://www.ucl.ac.uk/~tcrnahb/tmp/pal.html
and
http://www.ucl.ac.uk/~tcrnahb/tmp/palsmall.html

There are several js scripts to work around these iOS scaling issues. e.g:
https://github.com/blueimp/JavaScript-Load-Image/blob/master/js/load-image-ios.js

We could re-scale the image, and adjust the size described in:

new ol.layer.Image({…

but I suspect would need to find and use the original unscaled size for the projection extent:

task.pixelProjection = new ol.proj.Projection({…

to make the polygon-drawing compatible with those done on other devices….
So I am not sure that fixing this is a priority?

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

1 participant