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

Tips for multiple screen support in 2D opengl game?

The question of supporting multiple screens has been asked to death, but I haven't seen much discussion in regards to game development (with hitboxes, collision checking, etc). Currently, my game is running in "compatibility mode" producing very…
Andy Rey
  • 73
  • 3
5
votes
9 answers

Are there algorithms for increasing resolution of an image?

Are there any algorithms or tools that can increase the resolution of an image - besides just a simple zoom that makes each individual pixel in the image a little larger? I realize that such an algorithm would have to invent pixels that don't really…
David Koelle
  • 20,726
  • 23
  • 93
  • 130
5
votes
3 answers

Custom method to rescale a PNG loses transparency

Hey folks, I am working on a j2ME game for java-capable cell phones. I am attempting to scale a transparent PNG with the following method: // method derived from a Snippet from http://snippets.dzone.com/posts/show/3257 // scales an image according…
jbabey
  • 45,965
  • 12
  • 71
  • 94
5
votes
2 answers

JSP How to scale an image?

Is there anyway to scale an image then display in jsp page? When retrieve and display the images, I want to show all photos in same size. is there any API can do it? I have searched from google, those I found was about scaling images byusing tookit…
user236501
  • 8,538
  • 24
  • 85
  • 119
5
votes
2 answers

App size is too big because of too many images

I'm creating an universal app. For one screen, I'm displaying 6 images (png format) in a grid using this control. Also this screen supports both portrait and landscape orientation. I've created a set of images in different resolutions for all the…
Isuru
  • 30,617
  • 60
  • 187
  • 303
5
votes
3 answers

Android graphics for XXHDPI

I'm about to adjust all drawables for an Android app for XXHDPI devices (like sony xperia Z and samsung s4). After thorough reading on Google's documentation, blogs, and SO, I'm confused as to the graphics I'm about to produce. My concerns are the…
otinanai
  • 3,987
  • 3
  • 25
  • 43
5
votes
2 answers

opengl, textures have always the same size

I'm trying to apply a texture to a vertex array whit the following code: glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,…
Luca
  • 1,270
  • 1
  • 18
  • 34
5
votes
2 answers

Canvas inline height and width attributes overridden with css styles. Is this is a bug?

I recently asked a question on how to draw an image larger than my canvas onto the canvas without cropping and save the image back into its original dimensions after performing some changes on it. I found the solution is to set the inline height and…
Rutwick Gangurde
  • 4,772
  • 11
  • 53
  • 87
5
votes
2 answers

How to resize an image with JavaScript / jQuery without pixelation like the browser does?

I'm making a javascript / jquery program for a webpage to let a user open an image file locally from their computer, and then the program resizes it to a 16 x 16 icon size and saves it as a data url. Everything works fine, except the resized image…
theMaxx
  • 3,756
  • 2
  • 27
  • 33
5
votes
3 answers

How can I position an image in a box such that it fits exaclty in width or heigth, whichever is smaller?

I want to load some photos from a server and display each of them in an own box such that the box is filled and the image centered (not stretched), if it is to big. Can I achieve this for example with CSS without knowing the size of each image?…
AME
  • 2,499
  • 5
  • 29
  • 45
4
votes
2 answers

How can I have flexible css image sizing with max height and width while preserving image aspect ratio, without javascript?

I really thought this would be elsewhere on stack overflow, but I searched fruitlessly for length of time. Forgive me if I missed it. I have a set of images who need to be made as large as possible (width: 100% to container elem) as long as the…
jxn
  • 183
  • 2
  • 9
4
votes
1 answer

Calculating new image size using an imagemagick's format string and a width/height

In web apps, it's good practice to use the width and height attributes for img tags -- this allows the browser to render the page faster. If I have the width and height of an image, and a imagemagick format string (i.e. '300>'), how can I get the…
Joe Van Dyk
  • 6,828
  • 8
  • 57
  • 73
4
votes
1 answer

Can I disable Firefox' image scaling with CSS on a per image basis?

There are two occasions on my web page where I don't want Firefox to automatically scale the images when zooming in and out. Can I circumvent this feature on these images specifically, and have the rest of the images zoom as normal in Firefox (if…
Henrik
  • 2,421
  • 4
  • 25
  • 33
4
votes
1 answer

Webkit + jQuery + SuperBGImage: full-browser images not anti-aliasing

This image best illustrates the problem: I'm customizing a WordPress theme that uses SuperBGImage. In Safari 5.1 and Chrome 13, when resizing the browser window, images aren't anti-aliased smoothly and artifacts are clearly visible. You can readily…
Matt Stein
  • 3,053
  • 1
  • 19
  • 35
4
votes
2 answers

how to scale image according to screen resolution?

friends, i am using following code to resizeImage private Bitmap resizeImage( final Bitmap image) { Bitmap resizedImage = null; if(image != null) { int maxHeight = 80; //actual image height coming from internet …
UMAR-MOBITSOLUTIONS
  • 77,236
  • 95
  • 209
  • 278