You are not logged in.

1

Monday, May 26th 2014, 12:42am

Image scaling in style tag?

Can someone tell my why when scaling an image with <style> it aliases so badly?

For example.

Left image is at 40px native, Right is the same thing but a 240px image with width/height set to 40 in <style>






That looks horrible.

Is there a better way to scale this stuff? Can I access these elements through CSS? I don't want to have to figure out the best pixel size for each asset manually.

2

Wednesday, May 28th 2014, 2:51pm

Hi,

it depends on the browser itself how CSS scalings will be finally rendered. The browsers are working quite differently here.

What browser and device are you using?
And what kind of hotspot - a normal one plus scaling/zooming or a distorted one?

Best regards,
Klaus

3

Friday, May 30th 2014, 6:08pm

Chrome on Desktop for this. I've never had an issue scaling assets with CSS, I just wonder how KRpano is.

Source code

1
2
 <style name="info-point" url="assets/images/ui/info-point.png" width="40" height="prop" alpha="0.8"/>
<hotspot name="intro-jack" style="info-point" zoom="false" ath="-47" atv="1.6"  onclick="showJack" />

4

Tuesday, June 3rd 2014, 6:22pm

Hi,

Chrome switches automatically to a faster rendering mode when the CSS attributes are constantly changing.

Best regards,
Klaus