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

Java (Android): How to scale a drawable without Bitmap?

I need to scale the background image of a button but can't turn it into a Bitmap. Here is the code right now: int height = 50; int width = 80; Button b = new Button (this); b. setBackgroundResource(R.drawable.btn); Now I need to scale…
BinaryMonster
  • 63
  • 1
  • 1
  • 5
6
votes
3 answers

Equal-height scaling cells in an html table

I'm having some trouble with HTML tables when I make this design: The left-hand cell is a rowspan="2" cell, and the right two are using height="50%" attributes. Below is the expected behavior: +-------------+-----------------+ | …
jbzdarkid
  • 178
  • 1
  • 12
6
votes
2 answers

CSS scaling a border-image

I am seeking some assistance creating a border that scales with different screen sizes/devices. I've attached both the desired outcome, html/css I've written so far and a live page to preview the results so far. Issues/Questions: The border is set…
Zephyr Mays
  • 477
  • 3
  • 7
  • 24
6
votes
1 answer

Retrieve hidensity drawable from package (honeycomb)

This code final ApplicationInfo ai = getPackageManager().getApplicationInfo("com.company.hello", 0); final Drawable d = getPackageManager().getApplicationIcon(ai); retreive a 48x48 (mdpi) drawable even on my hidensity HoneyComb device. Given that I…
lorenzoff
  • 1,120
  • 3
  • 15
  • 32
6
votes
2 answers

LibGDX FrameBuffer scaling

I'm working on a painting application using the LibGDX framework, and I am using their FrameBuffer class to merge what the user draws onto a solid texture, which is what they see as their drawing. That aspect is working just fine, however, the area…
Synthetik
  • 219
  • 3
  • 11
6
votes
3 answers

Scale drawableLeft in button with text

I have a button with text and a drawable on the left. Is there any way I can make that drawable scale to it's appropriate size (fill button's height) while keeping its aspect ratio? Relevant excerpt from my layout:
5
votes
2 answers

Android: Notify Scrollview that it's child's size has changed: how?

When I enlarge the size of the content of a scrollview, the scrollview takes a while to get to "know" this size change of it's child. How can I order the ScrollView to check it's child immediately? I have an ImageView in a LinearLayout in a…
Frank
  • 12,010
  • 8
  • 61
  • 78
5
votes
3 answers

Is it easier to supply one high resolution drawable PNG asset and let Android scale this down?

I'm looking to create a background image for a viewgroup in an Android app, and I'm not sure what is best to do with the asset. Is it easier (read:looks better on most phones) to simply supply the asset as 900x570 or there abouts and let Android…
Chris S
  • 64,770
  • 52
  • 221
  • 239
5
votes
1 answer

I do not understand WCF scaling with security / Why is lsass.exe CPU% so high?

I've got a WCF service with about 500 clients that make a call every 3 minutes. The lsass.exe process is using 95% of my CPU when the service is on. I did a test and every time a client makes a call, the lsass CPU% goes up to around 7 or so. So I…
Marcus
  • 5,407
  • 3
  • 31
  • 54
5
votes
1 answer

Why does powershell console incorrectly size my GUI form?

I want to open a powershell GUI Form of a specific size on a Windows 11 screen of 1920 x 1080 pixels. The system scaling in Settings is set to 125%. This cannot be an unusual configuration. As a test, I try to open a form that is a quarter of the…
Londoner
  • 53
  • 4
5
votes
3 answers

In Node.js, why should I prefer key-value stores over application variable?

I am developing a Socket.IO-backed real-time application in Node.JS that will be used by couple of hundred users simultaneously at any given moment, and I need to store some basic details about each connected client (and remove those details upon…
Martin Tajur
  • 5,242
  • 1
  • 20
  • 15
5
votes
2 answers

Scaling Software/Hardware for a Large # of External API Requests?

We have a system that given a batch of requests, makes an equivalent number of calls to an external 3rd Party API. Given that this is an I/O bound task, we currently use a cached thread-pool of size 20 to service these requests. Other than above, is…
smonky
  • 51
  • 2
5
votes
1 answer

Resize CGImageRef without anti-liasing

I am trying to resize a 10x10 pixel CGImageRef, captured like this: CGImageRef imageRef = CGImageCreateWithImageInRect(screenShot, CGRectMake(mouseLoc.x-5, screen_height-mouseLoc.y-5, 10, 10)); CGContextRef mainViewContentContext =…
Marek
  • 83
  • 1
  • 4
5
votes
3 answers

Can Pyramid's Built-in Authentication/Authorization Implement Complex Security Schemes?

It seems like the security model fits very small projects, but that it is probably not feasible to write all possible registered users' hashed passwords in security.py. Do you know any examples of scaling up Pyramid's authentication, or are there…
nnythm
  • 3,280
  • 4
  • 26
  • 36
5
votes
3 answers

How To Scale The Contents Of A UIView To Fit A Destination Rectangle Whilst Maintaining The Aspect Ratio?

I am trying to solve a problem without success and am hoping someone could help. I have looked for similar posts but haven't been able to find anything which solves my problem. My Scenario is as follows: I have a UIView on which a number of other…
BlackMirrorz
  • 7,217
  • 2
  • 20
  • 31