Stop Firefox DPI Scaling (when Windows setting is at 125%)

You could easily let your website address users with settings at higher zoom levels by including a media query like: @media only screen and( -webkit-min-device-pixel-ratio: 1.25 ), only screen and( -o-min-device-pixel-ratio: 5/4 ), only screen and( min-resolution: 120dpi ), only screen and( min-resolution: 1.25dppx ) { body { font-size: 1rem; } } See this article … Read more

Why feature scaling in SVM?

Feature scaling is a general trick applied to optimization problems (not just SVM). The underline algorithm to solve the optimization problem of SVM is gradient descend. Andrew Ng has a great explanation in his coursera videos here. I will illustrate the core ideas here (I borrow Andrew’s slides). Suppose you have only two parameters and … Read more

Image scaling by CSS: is there a webkit alternative for -moz-crisp-edges?

WebKit now supports the CSS directive: image-rendering:-webkit-optimize-contrast; You can see it working in action using Chrome and the last image on this page: http://phrogz.net/tmp/canvas_image_zoom.html The rules used on that page are: .pixelated { image-rendering:optimizeSpeed; /* Legal fallback */ image-rendering:-moz-crisp-edges; /* Firefox */ image-rendering:-o-crisp-edges; /* Opera */ image-rendering:-webkit-optimize-contrast; /* Safari */ image-rendering:optimize-contrast; /* CSS3 Proposed */ … 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 images to screen size in Pygame

You can scale the image with pygame.transform.scale: import pygame picture = pygame.image.load(filename) picture = pygame.transform.scale(picture, (1280, 720)) You can then get the bounding rectangle of picture with rect = picture.get_rect() and move the picture with rect = rect.move((x, y)) screen.blit(picture, rect) where screen was set with something like screen = pygame.display.set_mode((1600, 900)) To allow your … Read more