image-scaling

Resize transparent images using C#

Does anyone have the secret formula to resizing transparent images (mainly GIFs) without ANY quality loss - what so ever? I've tried a bunch of stuff, the closest I get is not good enough. Take a look at my main image: http://www.thewallcompany.dk/test/main.gif And then the scaled image: http://www.thewallcompany.dk/test/ScaledImage...

Resizing an Image without losing any quality

Hi, I need to resize an image, but the image quality cannot be affected by this. (C#) ...

how to workaround a java image scaling bug

I've got a java servlet which is hitting this bug when down-scaling images... http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5101502 I'm trying to work out the best way to work around it and would appreciate any ideas from the community. Thanks, Steve ...

What is the fastest way to scale and display an image in Python?

I am required to display a two dimensional numpy.array of int16 at 20fps or so. Using Matplotlib's imshow chokes on anything above 10fps. There obviously are some issues with scaling and interpolation. I should add that the dimensions of the array are not known, but will probably be around thirty by four hundred. These are data from a ...

High Quality Image Scaling C#

I want to scale an image in C# with quality level as good as Photoshop does. Is there any C# image processing library available to do this thing? ...

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 factor and get a new image. So, if I scale the image by a factor of 0.68, I should get a new i...

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 by OpenGL (i.e. my video card) and my routine and it's miles apart in quality. I've Google ...

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 exist in the original image, but I figured there might be some algorithm that could inte...

Java 2D and resize

I have some old Java 2D code I want to reuse, but was wondering, is this the best way to get the highest quality images? public static BufferedImage getScaled(BufferedImage imgSrc, Dimension dim) { // This code ensures that all the pixels in the image are loaded. Image scaled = imgSrc.getScaledInstance( dim.width, dim.height, ...

Dynamically reducing image dimension as well as image size in C#

I have an image gallery that is created using a repeater control. The repeater gets bound inside my code behind file to a table that contains various image paths. The images in my repeater are populated like this <img src='<%# Eval("PicturePath")' %>' height='200px' width='150px'/> (or something along those lines, I don't recall the...

Scale image to completely fill bounding box

For instance, if I need to fill a bounding box that is 100px wide by 50px tall, the following input images would have the following behavior: 200w x 200h gets scaled down 50% and 25% gets chopped off the top and bottom. 200w x 100h gets scaled down 50% with no cropping. 100w x 200h gets is not scaled, but 75px get chopped off top and b...

Resizing an image with alpha channel

I am writing some code to generate images - essentially I have a source image that is large and includes transparent regions. I use GDI+ to open that image and add additional objects. What I want to do next is to save this new image much smaller, so I used the Bitmap constructor that takes a source Image object and a height and width, ...

Create thumbnail and reduce image size

I have very large images (jpg) and i want to write a csharp program to loop through the files and reduce the size of each image by 75%. I tried this: Image thumbNail = image.GetThumbnailImage(800, 600, null, new IntPtr()); but the file size is still very large. Is there anyway to create thumbnails and have the filesize be much small...

Image resizing - sometimes very poor quality?!

I'm resizing some images to the screen resolution of the user; if the aspect ratio is wrong, the image should be cut. My code looks like this: protected void ConvertToBitmap(string filename) { var origImg = System.Drawing.Image.FromFile(filename); var widthDivisor = (double)origImg.Width / (double)System.Windows.Form...

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 libraries or built in functions will offer the best results? I will consider the following criter...

How can I crop/scale user images so I can display fixed sized thumbnails without skewing and stretching?

I'm working on allowing users to upload profile pictures for my site. The classic example of what I'm trying to avoid is plentyoffish.com where each users image is skewed and looks very ugly: So, how can I progmatically crop/create standard sized versions of an image without the skewing demonstrated above? ...

How do you scale an image for print without degrading the quality?

I was wondering how would you print an image that's scaled three times its original size without making it look like crap? If you change the dpi to 300 and print it'll look like crap. Is there a way to convert it gracefully? ...

Resize images in directory

Hey, I have a directory full of images that I would like to resize to around 60% of their original size. How would I go about doing this? Can be in either Python or Perl Cheers Eef ...

Auto scale and rotate images

Given: two images of the same subject matter; the images have the same resolution, colour depth, and file format; the images differ in size and rotation; and two lists of (x, y) co-ordinates that correlate the images. I would like to know: How do you transform the larger image so that it visually aligns to the second image? (Option...

Scale an image which is stored as a byte[] in Java

I upload a file with a struts form. I have the image as a byte[] and I would like to scale it. FormFile file = (FormFile) dynaform.get("file"); byte[] fileData = file.getFileData(); fileData = scale(fileData,200,200); public byte[] scale(byte[] fileData, int width, int height) { // TODO } Anyone knows an easy function to do this? ...