Why isn’t my vector drawable scaling as expected?

There is new info about this issue here: https://code.google.com/p/android/issues/detail?id=202019 It looks like using android:scaleType=”fitXY” will make it scale correctly on Lollipop. From a Google engineer: Hi, Let me know if scaleType=”fitXY” can be a workaround for you , in order to get the image look sharp. The marshmallow Vs Lollipop is due to a special … Read more

Image scaling causes poor quality in firefox/internet explorer but not chrome

It seems that you are right. No option scales the image better: http://www.maxrev.de/html/image-scaling.html I’ve tested FF14, IE9, OP12 and GC21. Only GC has a better scaling that can be deactivated through image-rendering: -webkit-optimize-contrast. All other browsers have no/poor scaling. Screenshot of the different output: http://www.maxrev.de/files/2012/08/screenshot_interpolation_jquery_animate.png Update 2017 Meanwhile some more browsers support smooth scaling: ME38 … Read more

How to scale SVG image to fill browser window?

How about: html, body { margin:0; padding:0; overflow:hidden } svg { position:fixed; top:0; bottom:0; left:0; right:0 } Or: html, body { margin:0; padding:0; overflow:hidden } svg { position:fixed; top:0; left:0; height:100%; width:100% } I have an example on my site using (roughly) this technique, albeit with 5% padding all around, and using position:absolute instead of … Read more

Scaling solutions for MySQL (Replication, Clustering)

I’ve been doing A LOT of reading on the available options. I also got my hands on High Performance MySQL 2nd edition, which I highly recommend. This is what I’ve managed to piece together: Clustering Clustering in the general sense is distributing load across many servers that appear to an outside application as one server. … Read more

Disable DPI awareness for WPF application

DPIAwareness Just some ideas (not tried): Are you running on XP? That option might not work on that platform. http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/5e60a54d-baf5-46e3-9eac-a959f2a0fba1/ What follows are probably just different ways to set the same DpiAwareness option: look at the “compatibility mode” settings on your EXE…right click it’s properties…and turn on “Disable display scaling” create a manifest, and say … Read more

How to scale down a UIImage and make it crispy / sharp at the same time instead of blurry?

Merely using imageWithCGImage is not sufficient. It will scale, but the result will be blurry and suboptimal whether scaling up or down. If you want to get the aliasing right and get rid of the “jaggies” you need something like this: http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/. My working test code looks something like this, which is Trevor’s solution with … Read more

Scale a series between two points

It’s straight-forward to create a small function to do this using basic arithmetic: s = sort(rexp(100)) range01 <- function(x){(x-min(x))/(max(x)-min(x))} range01(s) [1] 0.000000000 0.003338782 0.007572326 0.012192201 0.016055006 0.017161145 [7] 0.019949532 0.023839810 0.024421602 0.027197168 0.029889484 0.033039408 [13] 0.033783376 0.038051265 0.045183382 0.049560233 0.056941611 0.057552543 [19] 0.062674982 0.066001242 0.066420884 0.067689067 0.069247825 0.069432174 [25] 0.070136067 0.076340460 0.078709590 0.080393512 0.085591881 0.087540132 … Read more