Questions tagged [image-scaling]

The use of interpolation to spatially stretch or squeeze an image by manipulating the underlying image data -- directly, or through API or ABI calls.

639 questions
25
votes
6 answers

Scale a BufferedImage the fastest and easiest way

The task: I have some images, I scale them down, and join them to one image. But I have a little problem with the implementation: The concrete problem: I want to resize/scale a BufferedImage. The getScaledInstance method returns an Image object,…
tamas.pflanzner
  • 325
  • 1
  • 6
  • 11
22
votes
7 answers

Scaling an Image in GWT

Changing the size of an Image Widget in GWT changes the size of the image element, but does not rescale the image on the screen. Therefore, the following will not work: Image image = new…
Daniel
  • 10,115
  • 3
  • 44
  • 62
19
votes
2 answers

Markdown: smaller images sizes not supported by GitHub?

I want to downsize some of my images in my README.md on GitHub and it works fine in my Markdown editor using something like ![](./images/my_img.png =400x) However, when I upload it to GitHub, the Markdown viewer seems to not like it. Any…
user2489252
18
votes
10 answers

How do I do high quality scaling of a image?

I'm writing some code to scale a 32 bit RGBA image in C/C++. I have written a few attempts that have been somewhat successful, but they're slow and most importantly the quality of the sized image is not acceptable. I compared the same image scaled…
Patrick Hogan
  • 2,098
  • 4
  • 20
  • 28
17
votes
2 answers

Image scaling (KeepAspectRatioByExpanding) through OpenGL

I'm trying to implement image scaling in OpenGL using only glTexCoord2f() and glVertex2f(). Let me explain: after loading a QImage and sending it to the gpu with glTexImage2D() I have to perform image scaling operations based on Qt's specification.…
karlphillip
  • 92,053
  • 36
  • 243
  • 426
17
votes
4 answers

Scale an image nicely in Delphi?

I'm using Delphi 2009 and I'd like to scale an image to fit the available space. the image is always displayed smaller than the original. the problem is TImage Stretch property doesn't do a nice job and harms the picture's readability. (source:…
X-Ray
  • 2,816
  • 1
  • 37
  • 66
16
votes
5 answers

Scaling sprites in SDL

How can i scale sprites in SDL?
kmaxeg
  • 163
  • 1
  • 1
  • 4
15
votes
2 answers

How can I transform XY coordinates and height/width on a scaled image to an original sized image?

Related Question I am trying to do the same thing as in the linked question, but with C#. I am showing a scaled image and am allowing a user to select an area to crop. However, I can't just take the x1y1, x2y2 coordinates from the scaled image…
scottm
  • 27,829
  • 22
  • 107
  • 159
15
votes
9 answers

Animatedly reduce button size on press and regain it's size on release

I want a to create a button that changes size (little bit smaller) when it's pressed, and after the button is released again the size should change back to normal size.I am using Scale xml to achieve this but it re-positioned itself even if i do not…
user2028
  • 163
  • 4
  • 15
  • 40
15
votes
2 answers

How to scale an image (in data URI format) in JavaScript (real scaling, not using styling)

We are capturing a visible tab in a Chrome browser (by using the extensions API chrome.tabs.captureVisibleTab) and receiving a snapshot in the data URI scheme (Base64 encoded string). Is there a JavaScript library that can be used to scale down an…
14
votes
7 answers

What is the best way to scale images in Java?

I have a web application written in Java (Spring, Hibernate/JPA, Struts2) where users can upload images and store them in the file system. I would like to scale those images so that they are of a consistent size for display on the site. What…
Peter Kelley
  • 2,350
  • 8
  • 26
  • 46
14
votes
10 answers

Image scaling and rotating in C/C++

What is the best way to scale a 2D image array? For instance, suppose I have an image of 1024 x 2048 bytes, with each byte being a pixel. Each pixel is a grayscale level from 0 to 255. I would like to be able to scale this image by an arbitrary…
kafuchau
  • 5,573
  • 7
  • 33
  • 38
13
votes
1 answer

Excel VBA Image EXIF Orientation

Made this macro that inserts images from the active directory into an excel spreadsheet and scales it down to fit in the cell. It works pretty well except for images that come from a source were their orientation/rotation is defined in the EXIF…
Martin Sing
  • 1,247
  • 10
  • 15
13
votes
1 answer

Bilinear image interpolation / scaling - A calculation example

I would like to ask you about some bilinear interpolation / scaling details. Let's assume that we have this matrix: |100 | 50 | |70 | 20 | This is a 2 x 2 grayscale image. Now, I would like scale it by factor of two and my matrix looks like…
11
votes
1 answer

Java - I need a very fast image scaling algorithm

I am working on a Midlet application. I am finding myself in the need to scale images very often. This has become a problem because some phones are pretty slow and scaling takes too long. Currently I'm using Image.createRGBImage(int, int, int,…
user445338
1
2
3
42 43