image-scaling

Resize Image in Java. How to resize

I am trying to display an image on a Frame, however the image doesn't fit exactly on the frame. How can I resize the image? I cannot resize the frame. I need it to stay the same size all the time. // Override paint(): public void paint (Graphics g) { Dimension dimension = this.getSize(); Insets I = this.getInsets(); ...

Resized image degrades in quality.

I resized an image using Java2D Graphics class. But it doesn't look right. BufferedImage resizedImage = new BufferedImage(IMG_WIDTH, IMG_HEIGHT, type); Graphics2D g = resizedImage.createGraphics(); g.drawImage(originalImage, 0, 0, IMG_WIDTH, IMG_HEIGHT, null); g.dispose(); Is it possible to scale an image without intro...

image scaling with C

Hi - I'm trying to read an image file and scale it by multiplying each byte by a scale its pixel levels by some absolute factor. I'm not sure I'm doing it right, though - void scale_file(char *infile, char *outfile, float scale) { // open files for reading FILE *infile_p = fopen(infile, 'r'); FILE *outfile_p = fopen(outfile...

What would be a good way to scale images in C#?

I got a website which contains a lot of projects with each project containing a sidebar. In this sidebar it is possible to attach images to a project. The images attached will be shown in a gallery with 3 small thumbs at the bottom and one bigger image at the top of the gallery. The big image will refresh to another image when a visitor...

Image Auto Resize / Scaling with JQUERY

Hello, I have a div with width 600 px. I want to pull the images dynamically. Images size are varies. What I want to do is, if the image size is more than 600 px, we will resize the image to 600 px to fit into the div. But if the image is not more than 600px, we will leave as original image width. How can i achieve that by using jque...

Is there a tool that can automatically scale HTML image maps?

We have many imagemaps for a site in early implementation phase. Unfortunately, a design change requires that we change the physical display size of these maps... are there any tools that can automatically take the <map> data and scale the areas appropriately? ...

How to speed up drawing of scaled image? Audio playback chokes during window resize.

I am writing an audio player for OSX. One view is a custom view that displays a waveform. The waveform is stored as a instance variable of type NSImage with an NSBitmapImageRep. The view also displays a progress indicator (a thick red line). Therefore, it is updated/redrawn every 30 milliseconds. Since it takes a rather long time to rec...

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 image to a certain size? Currently we are styling it via CSS, but have to pay performance...

How to scale an Image in ImageView to keep the aspect ratio

Hi, In android, I defined an ImageView's layoutWidth to be 'fill_parent' (which takes up the full width of the phone). My question is if the Image i put to ImageView is bigger than the layoutWidth, android will scale it, right? But what about the height? when android scale it, will it keeps the aspect ratio? What I find out is, there ...

How to scale an image using openGL (JGL) ?

I want to scale an image using openGL, can anyone provide me with such code about how to do this ? PS, I am using JGL as an openGL library for Java. ...

How to scale JPEG image down so that text is clear as possible?

I have some JPEG images that I need scale down to about 80% of original size. Original image dimension are about 700px × 1000px. Images contain some computer generated text and possibly some graphics (similar to what you would find in corporate word documents). How to scale image so that the text is as legible as possible? Currently we...

Increase/decrease image size, website

Hi, i have a webpage with table and in it images, i would like to add the option to increase/decrease image size, how could i do that? Something like ctr+plus and ctr+ minus does. This is what it is for now, http://www.ursic-ei.si/1.html Thank you all for answers. ...

How to specify the image scaling algorithm used by a WPF Image?

Is there a way to specify how an image is scaled up in an Image element with LayoutTransform set to a ScaleTransform with integer values for ScaleX and ScaleY? I want to display the scaled image crisply (ie using 'nearest neighbour' scaling), with no blurring. (Imagine how you would want a bitmap editing program to behave when zooming i...

Auto-resize large images with JavaScript?

I have an application that allows people to post images on each others profiles with bb code. Problem is, some post very large images, which cover other parts of the site when are viewed. How can I scale down images, client-side, so they are no bigger than x by y dimensions? EDIT. These are myspace profile style images.... that peopl...

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 but can't works in web application. ...

how can reduce the resolution of scan image

how can reduce the resolution of scan image ...

Flex 4: Scale to a point (zoom into an image where the mouse was clicked)

I've been trying to get this working and I can't seem to figure it out. There is an Image control that when I click on it I need to zoom in (using the center/transform point where the mouse is clicked). I have the zoom transition working great, but when I set transformX & tranformY (with autoCenterTransform false) it doesn't zoom int...

video scaling using C#

I need to perform video scaling in my C++ app. I know I can use COM to communicate to C#, and I know C# can perform video scaling, so I am thinking of bridging the two worlds. How can I, using C#, scale a video image which is in memory, and then get the video data after the image is scaled? This question seems similar but how do I get...

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 to the ratios given as parameters private Image rescaleImage(Image image, double XRatio, ...

What's the performance impact of using bicubic interpolation in IE?

Everybody knows that IE7 sucks at scaling images. I just recently discovered the trick of using img { -ms-interpolation-mode: bicubic; } to force IE to use bicubic sampling when scaling images so that they look better. However, I was wondering if anyone knows the performance impact of using ms-interpolation-mode. ...