image-resizing

Create a new image on the file system from System.Drawing.Image?

Ok, I'm sorry, this is probably a noob question but I'm kinda stuck. So what I'm doing (on my asp.net application) is loading an image from the file system: System.Drawing.Image tempImage; tempImage = System.Drawing.Image.FromFile(HttpContext.Server.MapPath(originalPath)); Then I do some resizing: tempImage = my awesomeResizingFunct...

How to resize an image in C# to a certain hard-disk size?

How to resize an image an image in C# to a certain hard-disk size, like 2MiB? Is there a better way than trial and error (even if it's approximate, of course). Any particular keywords to search for when trying to find the solution on the web? ...

What do scale and inflate do in the ImageMagick file resizer class

I am using ImageMagick via Symfony to resize images in PHP. The sfThumbnailer class uses 'scale' and 'inflate' parameters to interface with ImageMagick. What do they do and how will they affect my results? I realise this is a RTFM question, but I already have, and the documentation is not clear. Image Magick Documentation Symfony Thu...

Resize an Uploaded Image in Silverlight 3

Hi, I'm trying to resize an image in Silverlight 3 that has been submitted by a user via the OpenFileDialog control. I can grab the contents of the file and put it into a WriteableBitmap object and then display it on the screen just fine into an Image control. The Image control will even resize it to fit the size of the image control for...

unwanted UIImageView resizing when in a UIView

I'm programatically creating a custom section header for a table that has a width set to 290. When I use a UIImageView containing a 290 x 29 PNG directly the image appears correctly. However, I'm refactoring to include a UILabel so I can do some custom text so I place the UIImageView and UILabel in a UIView. When I view this version, ...

C# Very Simple Image Resizer

I am in need of a very simple c# image resizer. By simple, I mean simple. This is just a program that loops through a single directory and changes all the pictures in that directory to the same resolution. Here's what I have so far. private void Form1_Load(object sender, EventArgs e) { string[] files = null; ...

C# Simple Image Resize : File Size Not Shrinking

I have a question in regards to the code below. The code I have below successfully runs through a directory, and sets the resoultion of the picture to a smaller size. However, the file size is not changed. For example, an image with dimensions of 2400x1800 with file size of 1.5MB will be scaled to 800x600, but the 800x600 picture will...

How to set maximum height for $img but keep proportions

How to set maximum height or width for: $img_attributes= ' height=100 width=100 '. 'alt="'.$product['product_name'].'"'; ...

how to auto resize image in sql database in a table

Hello all, I have a question, I have a database with some webshop products. I load 2 images from a url (domain.com) one is for the thumb image (product_thumb_image) and the other is a full image. (product_full_image) I use for both the same url and resize the image by having a Height="100" attribute in the image tag.I know this is not...

How to generate a thumb image?

I have a folder of about 20000 images, and I need to generate thumb images for them. What's the fastest way to do this job? I know I can do it using some image resizing libraries. But I am wondering maybe there's already a tool or code snippets that could do this job. ...

PHP/HTML image resize

how can i resize an image like this: resize it to a specified width, keep the proportions and if the height is bigger than a specified value to crop to the specified height ? ok actually i know how to do that but i don't want to do this in a different file and refer the picture something like <img src="picture.php" />. I need to proces...

Resizing an image in an HTML5 canvas

I'm trying to create a thumbnail image on the client side using javascript and a canvas element, but when I shrink the image down, it looks terrible. It looks as if it was downsized in photoshop with the resampling set to 'Nearest Neighbor' instead of Bicubic. I know its possible to get this to look right, because this site can do it j...

Quality Problem when resizing images using C# Graphics Class

I am resizing an small images (eg 20x25) to larger images (eg 150x170). My problem is not about quality, which as expected is has some blurring. My problem is that a border is that a light colour border is being created on the right hand side and bottom of the image. Is there a way that this can be removed? My code is the following: us...

GAE images.resize with fixed proportional crop

I need to resize and crop to exactly 60x80px from various size and aspect ratio. Just before i put into Datastore. Anyone already got this issue resolved. Currently i already succed to just transform it to exact height (80px) with various width which nott look so good when i try to display it on a list. e.g jcaroussel. My db.put code i...

Resizing a monochromatic image in C#

Hi, I have the following code to resize a monochromatic image (hence pixel value is 0[black] or 255[white]) with the following code Bitmap ResizedCharImage = new Bitmap(newwidth, newheight); using (Graphics g = Graphics.FromImage((Image)ResizedCharImage)) { g.CompositingQuality = CompositingQuality....

Force maximum width and height for PHPThumb images

PHPThumb provides two great variables setting the output maximum width and height BUT "This is always overridden by ?w=_ GETstring parameter" $PHPTHUMB_CONFIG['output_maxwidth'] = 720; $PHPTHUMB_CONFIG['output_maxheight'] = 720; You can also set defaults, and for landscape/portrait: $PHPTHUMB_DEFAULTS['w'] = 720; $PHPTHUMB_DEFAULT...

PHP image resize on the fly vs storing resized images

I'm building a image sharing site and would like to know the pros and cons of resizing images on the fly with php and having the resized images stored. Which is faster? Which is more reliable? how big is the gap between the two methods in speed and performance? Please note that either way the images go through a PHP script for sta...

jQuery: How to smooth animated image resizing

I'm a jQuery noob - so please excuse the probable basicness of this question. I'm doing something pretty simple - on hover animate the position and size of an image. When you mouse over the images there are some noticeable 'jaggies' (in FF, chrome, safari and that other crappy browser) - is there a way to get rid of this? The jquery co...

I'm working on a website that sells different artwork, what's the best way to handle different image sizes?

I'm working on a website that will allow users to upload and sell their artwork in different sizes. I was wondering what the best way would be to handle the different file sizes automatically. A few points I was curious on: How to define different size categories (small, medium, large) in such a way that I'll be able to dynamically r...

Is there a way to dynamically define how an image appear in a page or in certain layout?

For so many time, I have encountered problems with managing image having abnormally long height or width. If I fixed their height and widht, they will appear streched? If I fixed their width, and if the height of the image is very long then also it will mess up the overall website. If I fixed their height, and if the width of the ima...