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
23
votes
2 answers

Get Canvas coordinates after scaling up/down or dragging in android

I'm developing an application in which I'm pasting images, doing drawing and painting on canvas. This app can also Scale up/down the canvas or drag it to different location. My problem is: I can't get the correct canvas coordinates after scaling or…
Awais Tariq
  • 7,724
  • 5
  • 31
  • 54
23
votes
19 answers

How do I double the size of an image on a web page?

I have an image, say 320 x 240 pixels in size, which I want to display doubled in size (i.e. 640 x 480 pixels) on a web page. In the past, I have done this by setting width=640 on the img tag. However, I have just spotted the following in the HTML…
user200783
  • 13,722
  • 12
  • 69
  • 135
23
votes
6 answers

Adjust RichTextBox font size under High DPI setting

My C# application includes grids with both simple text boxes and richtext boxes. Often the richtext boxes contain rich text copied and pasted from elsewhere, and often the rtf markup includes hardcoded font size (\fsXX, XX in half points). In most…
Steve RG
  • 231
  • 1
  • 4
21
votes
5 answers

Gems/Services for autoscaling Heroku's dynos and workers

I want to know if there are any good solutions for autoscaling dynos AND workers on Heroku in a production environment (probably a different solution for each of those, as they are pretty unrelated). What are you/companies using, regarding this? I…
FernandoH
  • 855
  • 1
  • 9
  • 17
21
votes
3 answers

Scaling an IdentityServer4 service

I have followed the IdentityServer4 quickstarts and am able to authenticate my javascript web page (almost the same as that provided in the quickstart) with a localhosted instance of IdentityServer using the Implicit grant. Again, my IdentityServer…
Jay
  • 9,561
  • 7
  • 51
  • 72
21
votes
3 answers

Resizing a canvas image without blurring it

I have a small image, which I am rendering on a canvas, like this: ctx.drawImage(img, 0, 0, img.width*2, img.height*2); I would like this to show a sharp upsized image (4 identical pixels for each image pixel). However, this code (in Chrome 29 on…
JJJollyjim
  • 5,837
  • 19
  • 56
  • 78
20
votes
2 answers

Scaling an object in three.js

I am getting Matrix3.getInverse(): can't invert matrix, determinant is 0 three.js 3976 error when I am trying to scale a cube object. var object = new.THREE.Mesh(geometry, material) xScale = 0.1; object.scale.x = object.scale.y =…
user2788945
  • 273
  • 1
  • 3
  • 8
20
votes
3 answers

How to partition Mysql across MULTIPLE SERVERS?

I know that horizontal partitioning...you can create many tables. How can you do this with multiple servers? This will allow Mysql to scale. Create X tables on X servers? Does anyone care to explain, or have a good beginner's tutorial (step-by-step)…
TIMEX
  • 259,804
  • 351
  • 777
  • 1,080
20
votes
3 answers

Full viewport height scaling div just css no js... Possible?

Ok, I'm trying to get a div to scale and the height is always the height of the viewport. I'm going to link to my examples as it needs some explaining. www.madmediablitz.com/tv/precentdemo.html The link above is the closest I've come to a solution…
angryDev
19
votes
3 answers

html5 canvas prevent linewidth scaling

If I draw a rectangle of say linewidth=2 and then scale it to double the size of the rectangle, I get a rectangle that has its border double the size of the initial linewidth. Is there a way to keep the linewidth to the perceived size of 2 or the…
Nilesh
  • 191
  • 1
  • 4
18
votes
5 answers

Trying to multiply a number from 0..4096 by 0.3 using only integer math

I'm trying to wrap my head around how I'd multiply a number from 0..4096 by 0.3 using just integers with shift operations and scaling, without dividing, in C. I'm new to this stuff and any input or step by step suggestions would be extremely…
18
votes
3 answers

How do you Schedule Index Updates in CouchDB

As far as I understand, CouchDB indexes are updated when a view is queried. Assuming there are more reads than writes, isn't this bad for scaling? How would I configure CouchDB to update indexes on writes, or better yet, on a schedule?
Jonathan Tran
  • 15,214
  • 9
  • 60
  • 67
17
votes
2 answers

Flask application scaling on Kubernetes and Gunicorn

We have a Flask application that is served via gunicorn, using the eventlet worker. We're deploying the application in a kubernetes pod, with the idea of scaling the number of pods depending on workload. The recommended settings for the number of…
CadentOrange
  • 3,263
  • 1
  • 34
  • 52
16
votes
2 answers

Scaling canvas element with static resolution

I have canvas element and I want to scale it down, but without changing it's js logic. Drawing space in js should always be 600x300px, even if it is displayed in HTML as 300x150px. I know, I can resize image with static resolution, but can I do the…
ciembor
  • 7,189
  • 13
  • 59
  • 100
16
votes
6 answers

SwiftUI - Text minimumScaleFactor not scaling only when needed

I have a Text that I want to modify with a .minimumScaleFactor(0.1) when the length of its string extends outside the view. However, the scaling applies every time, even when the original font size would be perfectly fine. My view is structured…
A. Lucas
  • 261
  • 3
  • 11