resize-image

HTML + Javascript: Dynamic Image Resize?

Hello, I am trying to get some javascript to programatically adjust a html img tag's width to display various sized images correctly. I have a fixed width img tag at 800px to display an image, this is the max width. If the image is wider then 800px I want to display it at 800px wide; If the image is less than 800px wide I want to pres...

How can I resize an image to fit area with Image::Magick?

From command line with imagemagick, you can use: convert dragon.gif -resize 64x64^ -gravity center -extent 64x64 fill_crop_dragon.gif to resize and then crop an image so that it fills the area as much as possible. How do I do this from Perl's Image::Magick? ...

PHP Fatal Error while uploading/resizing images..

Hi all, I'm using a code which will upload an image, put the image in the "resize" folder, resize the image, move the image into another folder, then delete the image from the "resize" folder, however I'm getting the following error: "Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 14172 bytes) in /home/p...

wxPython - Resizing an image with the EVT_SIZE event of its parent panel

My previous attempt at asking this question was horrible and I had also made some progress, please bear with me, I did not intend to re-ask this so many times, and it is not my style. Here is the final version: I am resizing a window that contains a DC Client painted bitmap and on the EVT_SIZE event, I am resizing it by re-scaling it (...

Image resizing from a database with PHP

Hi all, I currently have a script which will pull in image contents from a database and, using createimagefromstring(), returns a resized (resampled) image for display: $max_width = 170; // Get the image @mysql_connect('host', 'user', 'pass'); @mysql_select_db('db'); $query = "SELECT `thumbnail_contents`, `thumbnail_mimetype` FROM `v...

Nearest-neighbor interpolation algorithm in MATLAB

I am trying to write my own function for scaling up an input image by using the Nearest-neighbor interpolation algorithm. The bad part is I am able to see how it works but cannot find the algorithm itself. I will be grateful for any help. Here's what I tried for scaling up the input image by a factor of 2: function output = nearest(inp...

ASP.NET: resize (height and width) an image uploaded to server.

Hello! How can I resize an image on server that I just uploaded? I using C# with .NET Framework 3.5 SP1. Thanks! ...

VS 2008 using VB coding

I need help with coding please; I don't know how to resize images before saving them into a folder. Then, I would like to retrieve this image (binary data) and display in grid view. Your help is greatly appreciated. ...

Video window resize in windows

This is related video capturing in WINDOWS. Video will be recording,meanwhile i will drag the window(dialog box)( i mean with mouse pointer i will enlarge/or compress the window),then the video image also should get enlarged/compressed to fit into the window. How to achive this task? Help Code is in vc++ Does this Win api stretchBlt()...

resizeing image . . . . .

hi thanks a lot i have one code below in this code ill upload one image . convert it into byte code and store it in database .. and retrive it in gridview .. the thing is before converting it into byte code i want to resize it could u plz tell me what code i should insert here ... thanks a lot .. ... protected void btnUpload_Click...

App Engine Cropping to a Specific Width and Height

I need to resize and crop an image to a specific width and height. I was able to construct a method that will create a square thumbnail, but I'm unsure on how to apply this, when the desired thumbnail is not square. def rescale(data, width, height): """Rescale the given image, optionally cropping it to make sure the result image has the...

resize a large picture to smaller size as a new picture

I want to resize a picture to smaller size and create it as unrelated to original sized picture. Currently I try to email a picture I have resized smaller, but it still contains too many mg to be accepted on email because it is still tied into the original sized pic. ...

How to resize Large image in NetCF?

I got out of memory exception when I try to load a 1MB image into a PictureBox to display on NetCF. Would appreciate someone can provide me some help. Thanks ...

Sometimes, scaling down a bitmap generates a bigger file. Why?

Hello, I'm trying to write a method to reduce the size of any image 50% each time is called but I've found a problem. Sometimes, I end up with a bigger filesize while the image is really just half of what it was. I'm taking care of DPI and PixelFormat. What else am I missing? Thank you for your time. public Bitmap ResizeBitmap(Bitmap ...

Best Practice for Images with Codeigniter : Generating Thumbs or Resizing on the Fly

Hi all, I know there’s been a good deal written on thumbnail generation and the like with CI, but I wanted to explain what I’ve made and see what kind of best-practice advice I could find. Here’s my story… Currently, I have a site which allows users to upload collections of photos to projects they’ve created after first creating an ac...

What events are triggered when resizing an image in designMode/contentEditable?

In Firefox and IE when you enable contentEditable on a div that contains an image, the image gets handles when clicked on that allow you to resize it. I'm struggling to find an event that fires after the resize occurs. I want to be able to update a properties inspector with the correct height and width values when the resize takes place....

Scaling a CBitmap - what am I doing wrong?

I've written the following code, which attempts to take a 32x32 bitmap (loaded through MFC's Resource system) and turn it into a 16x16 bitmap, so they can be used as the big and small CImageLists for a CListCtrl. However, when I open the CListCtrl, all the icons are black (in both small and large view). Before I started playing with resi...

Is there a 100% Java alternative to ImageIO for reading JPEG files?

We are using Java2D to resize photos uploaded to our website, but we run into an issue (a seemingly old one, cf.: http://forums.sun.com/thread.jspa?threadID=5425569) - a few particular JPEGs raise a CMMException when we try to ImageIO.read() an InputStream containing their binary data: java.awt.color.CMMException: Invalid image format ...

Resizable background on website

Is it possible to resize the background image of a webpage as the browser window is resized? ...

resize an image to an exact size, retain aspect, and fill any space in php

hy, Let's say I want to convert an image to an exact size, eg: 400x300. The trick is, if the image, due to its aspect ratio, does not fit in 400x300, then place it in there with black borders. A 900x1200 image would be converted down to 225x300 to retain its aspect ratio, and then given black borders left and right to make it 400x300. ...