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
41
votes
6 answers

Resizing images to fit the parent node

How do I get an image in an ImageView to automatically resize such that it always fits the parent node? Here is a small code example: @Override public void start(Stage stage) throws Exception { BorderPane pane = new BorderPane(); ImageView…
rbs
  • 1,087
  • 2
  • 17
  • 24
40
votes
4 answers

How to "scale" a numpy array?

I would like to scale an array of shape (h, w) by a factor of n, resulting in an array of shape (h*n, w*n), with the. Say that I have a 2x2 array: array([[1, 1], [0, 1]]) I would like to scale the array to become 4x4: array([[1, 1, 1, 1], …
David Eyk
  • 12,171
  • 11
  • 63
  • 103
34
votes
3 answers

Scale with CGAffineTransform and set the anchor

If I understand correctly scaling a UIView with CGAffineTransform anchors the transformation to its center. In particular: self.frame = CGRectMake(0,0,100,100); self.transform = CGAffineTransformMakeScale(2, 2); NSLog(@"%f;%f;%f;%f",…
hpique
  • 119,096
  • 131
  • 338
  • 476
32
votes
4 answers

How to create an ImageView that fills the parent height and displays an Image as big as possible?

I have an ImageView that is defined in the following way:
Janusz
  • 187,060
  • 113
  • 301
  • 369
32
votes
2 answers

Limit on number of git branches

I am musing about building a big system on top of git for various reasons but mainly convenience. But as part of the implementation I would end up making millions of branches and branching and merging between them. Can git actually scale this way? I…
user1778366
  • 323
  • 1
  • 3
  • 5
30
votes
3 answers

Best practice for rate limiting users of a REST API?

I am putting together a REST API and as I'm unsure how it will scale or what the demand for it will be, I'd like to be able to rate limit uses of it as well as to be able to temporarily refuse requests when the box is over capacity or if there is…
frankodwyer
  • 13,948
  • 9
  • 50
  • 70
30
votes
9 answers

Disable DPI awareness for WPF application

Good day! I've been working on a WPF app for some time now (as a learning experience and oh boy it was a learning experience) and it's finally ready for release. Release means installing it on my HTPC where it will be used to browse my movie…
Johan Verbelen
  • 349
  • 1
  • 4
  • 7
28
votes
6 answers

Java: Scale Mapsforge Map when using online bitmap tiles instead of offline renderer

I use MapsForge 0.8 to display maps in my Android app. When using online tiles (which are just bitmaps and not vector data that can be adjusted in the runtime renderer), the map is really tiny on my Hi-resolution device and I can't read anything. I…
juergen d
  • 201,996
  • 37
  • 293
  • 362
28
votes
1 answer

Strange HTML5 Canvas drawImage behaviour

I am writing some code that uses HTML5 canvas. Generally it works well, but now I found a very strange behaviour. The weird thing is that it is consistent on different browsers, so must be that I understood the thing wrong... Despite the docs seem…
gotch4
  • 13,093
  • 29
  • 107
  • 170
27
votes
4 answers

How to scale MySQL with multiple machines?

I have a web app running LAMP. We recently have an increase in load and is now looking at solutions to scale. Scaling apache is pretty easy we are just going to have multiple multiple machines hosting it and round robin the incoming traffic.…
erotsppa
  • 1,731
  • 6
  • 19
  • 19
27
votes
3 answers

Android: high quality image resizing / scaling

I need to scale down images coming from a Network stream without losing quality. I am aware of this solution Strange out of memory issue while loading an image to a Bitmap object but it is too coarse - inSampleSize is an integer and does not allow…
Saideira
  • 2,374
  • 6
  • 38
  • 49
27
votes
1 answer

Why are some websites spread across www2, www3 sub-domains whilst others manage scaling without it?

I know it's to do with having a variety of load balancing servers, but why do some sites make use of differently named "www" sub domains (www2.somesite.com, www3.somesite.com etc) where as other can be perfectly massive without doing this - ie all…
Ray
  • 3,468
  • 8
  • 26
  • 27
26
votes
7 answers

How to disable web page zooming/scaling on Android?

I have written a small web app to collect some data and store it in a central database. I'm walking around, reading values and typing them into a web site on my Android smartphone. It's just for me, so no public usability concerns apply this…
ygoe
  • 18,655
  • 23
  • 113
  • 210
26
votes
2 answers

Stackpanel: Height vs ActualHeight vs ExtentHeight vs ViewportHeight vs DesiredSize vs RenderSize

i want to know the height of all items my StackPanel. What is the difference between: Height - Gets or sets the suggested height of the element. ActualHeight - Gets the rendered height of this element. (readonly) ExtentHeight - Gets a value that…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
26
votes
3 answers

How to fix scaling of a Java-based application on a high DPI display in Linux?

I just switched to Java 11 (AdoptOpenJDK) so that my Java Swing application looks OK on high DPI displays at different system scaling settings. It works OK on Windows. Regardless of the scaling value configured on the system, Java automatically…
Sergio
  • 311
  • 1
  • 4
  • 7