Questions tagged [scaling]

Scaling refers to the image manipulation function of re-sizing an image. For issues to do with handling increasing workload gracefully in software or network components, see "scalabilty".

Scaling refers to the image manipulation function of re-sizing an image.

2497 questions
73
votes
9 answers

Scale image keeping its aspect ratio in background drawable

How do I make a background image fit the view but keep its aspect ratio when using as a background drawable XML? None of 's android:gravity values gives the desired effect.
tilex
  • 1,744
  • 1
  • 17
  • 32
67
votes
6 answers

Scale a series between two points

How do I scale a series such that the first number in the series is 0 and last number is 1. I looked into 'approx', 'scale' but they do not achieve this objective. # generate series from exponential distr s = sort(rexp(100)) # scale/interpolate 's'…
user236215
  • 7,278
  • 23
  • 59
  • 87
65
votes
3 answers

Service Oriented Architecture - AMQP or HTTP

A little background. Very big monolithic Django application. All components use the same database. We need to separate services so we can independently upgrade some parts of the system without affecting the rest. We use RabbitMQ as a broker to…
jreid42
  • 1,240
  • 1
  • 12
  • 19
65
votes
1 answer

Is it possible to adjust a font's vertical scaling using CSS?

I am using an embedded font for the top navigational elements on a site Helvetica65 and at 16px it is the perfect WIDTH but I need it to be about 90% of it's current height. In Photoshop, the solution is simple - adjust the vertical scaling. Is…
Cynthia
  • 5,273
  • 13
  • 42
  • 71
64
votes
4 answers

PIL how to scale text size in relation to the size of the image

I'm trying to dynamically scale text to be placed on images of varying but known dimensions. The text will be applied as a watermark. Is there any way to scale the text in relation to the image dimensions? I don't require that the text take up the…
56
votes
13 answers

Distributed Concurrency Control

I've been working on this for a few days now, and I've found several solutions but none of them incredibly simple or lightweight. The problem is basically this: We have a cluster of 10 machines, each of which is running the same software on a…
Bob Gettys
  • 1,194
  • 1
  • 8
  • 12
53
votes
11 answers

CSS scale down image to fit in containing div, without specifing original size

I want to have a website where I can upload images of different sizes to be displayed in a jquery slider. I can't seem to fit (scaling down) the image in a containing div. Here's how I'm intending to do it
Muteking
  • 1,465
  • 5
  • 18
  • 31
50
votes
10 answers

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

See http://jsfiddle.net/aJ333/1/ in Chrome and then in either Firefox or Internet Explorer. The image is originally 120px, and I'm scaling down to 28px, but it looks bad pretty much no matter what you scale it down to. The image is a PNG and it has…
Andrew Rasmussen
  • 14,912
  • 10
  • 45
  • 81
50
votes
5 answers

How to scale images to screen size in Pygame

I was wondering how I would go about scaling the size of images in pygame projects to the resolution of the screen. For example, envisage the following scenario assuming windowed display mode for the time being; I assume full screen will be the…
Ilmiont
  • 2,032
  • 4
  • 27
  • 44
47
votes
5 answers

Load Balancing in Amazon EC2?

We've been fighting with HAProxy for a few days now in Amazon EC2; the experience has so far been great, but we're stuck on squeezing more performance out of the software load balancer. We're not exactly Linux networking whizzes (we're a .NET shop,…
Marc Bollinger
  • 3,109
  • 2
  • 27
  • 32
46
votes
2 answers

Making Sense of Android meta-viewport scaling: What am I missing?

I have been trying to determine how the viewport -- and the contents within -- are affected by the viewport meta tag used for drawing content with WebView or with the native browser. What I have run in to are some apparent inconsistencies. I created…
lilbyrdie
  • 1,887
  • 2
  • 20
  • 24
43
votes
3 answers

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

I have an image that is 100x100 in pixels. I want to show it twice the size, so 200x200 and I want to do it by CSS and (explicitly) not by the server. Since a few years, images get anti-aliased by all browsers instead of doing a by-pixel…
Martin Kool
  • 4,188
  • 4
  • 25
  • 36
43
votes
1 answer

How to scale images on a html5 canvas with better interpolation?

First of all: what am I trying to do? I have an application to view images. It uses the canvas element to render the image. You can zoom in, you can zoom out, and you can drag it around. This part works perfectly right now. But let's say I have an…
Kumpu
  • 433
  • 1
  • 4
  • 5
42
votes
7 answers

Why feature scaling in SVM?

I found that scaling in SVM (Support Vector Machine) problems really improve its performance. I have read this explanation: The main advantage of scaling is to avoid attributes in greater numeric ranges dominating those in smaller numeric…
Kevin
  • 569
  • 1
  • 5
  • 12
42
votes
5 answers

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

I'm currently making a webpage and testing it in chrome works fine, but in Firefox - it is zoomed in. This is because my DPI in Windows is set to 125%, and Firefox detects this, and adjusts every webpage accordingly. However, my webpage is not meant…
Brugsen
  • 603
  • 1
  • 6
  • 12