image-manipulation

4-point transform images

I need to transform bitmap images with their 4 corner points moved from one location to another. Any code that can run on Windows, C#/VB.NET preferably, even help how to use scriptable programs like Paint.NET or Photoshop would be accepted. The Java Advanced Imaging API sounds hopeful. I need it for a screenshot manipulation system, wh...

How to resize and save a Texture2D in XNA?

In a level editor I've made for my XNA game (editor is also in XNA) I'm allowing to scale Texture2D objects. When the user tries to save the level, I'd like to actually resize the image file on disk so that it doesn't require scaling in the game. Is there an easy way to create an image file (PNG preferred) from a scaled Texture2D objec...

How do I track an animated object in Python?

I want to automate playing a video game with Python. I want to write a script that can grab the screen image, diff it with the next frame and track an object to click on. What libraries would be useful for this other than PIL? ...

PHP upload code problem with permitted MIME file types...

Hi, I have a file (image) upload script in PHP that I use to upload and resize images... It uses a simple MIME type and size validation so only jpg images are allowed and 1MB max file size. I recently discovered a problem. When I try tu upload a .avi file using the script, the script processes the file like its the correct MIME type and...

Web based Image editing and annotation controls for ASP.NET

I am for a control that we can buy to crop and annotate images from an ASP.NET web site. The customer wants to be able to crop, change contrast, etc. AND add shapes (lines, squares, circles, text, etc.) The image quality doesn't need to be all that high. The images are used for "evidence" and are annotated to explain what is going o...

How to proportional resize image of any type in .NET?

Is possible to resize image proportionally in a way independent of the image type (bmp, jpg, png, etc)? I have this code and know that something is missing (but don't know what): public bool ResizeImage(string fileName, string imgFileName, ImageFormat format, int width, int height) { try { using (Image img = Image.F...

imagecreatefromjpeg() error - Why is my image manipulation script failing?

Hey everyone, I am currently using an image manipulation script to do some work on uploaded images and I'm running into a problem in my dev environment. This same code works on my production server. The error is: PHP Warning: imagecreatefromjpeg(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /path/to...

Rounding corners of pictures with ImageMagick

Hi, in my Rails app I want to have a similar profile section like Facebook where uploaded images are automatically thumbnailed and corner-rounded. I'm using the convert utility to downsize images into thumbnails, but is there an option to round their corners too? Thanks. ...

How can you make buttons on a MSVS C++ CToolBar larger along with their images?

We have a touch screen, and the toolbar is too small to hit with my meaty fingers. Is there an easy way I can have an option to make the toolbar buttons bigger and easier to hit? So far I've attempted a few things: m_toolbar.SetSizes( CSize(64,64), CSize(50,50) ); m_toolbar.SetSizes( CSize(64,64), CSize(50,50) ); m_toolbar.GetToolBarC...

LockBits Performance Critical Code

I have a method which needs to be as fast as it possibly can, it uses unsafe memory pointers and its my first foray into this type of coding so I know it can probably be faster. /// <summary> /// Copies bitmapdata from one bitmap to another at a specified point on the output bitmapdata /// </summary> /// <param name="sou...

Photo application

I'm developing an application just for fun that consists of capturing images from a webcam. What I would like to know is how can I apply some filters to the image that I capture? Ideally I would like to develop something like Apple iPhoto; something that defaces the image. The programming language I am using is C#. ...

Deface images and apply filters

Exact duplicate of Photo application Hi people. I'm developing an application, just for fun, that consists of capturing the image from a webcam. What I would like to know is: How can I apply some filters to the image that make things like iPhoto programm from Apple. Things like defacements, etc. I'm using C# as programming langu...

Blind deconvolution algorithm question

I was studying deconvolution, and stumbled upon Richardson-Lucy deconvolution, I was thinking of writing a simple program to do post-processing using this method, does anybody know where I can find complete implementable algorithms or source code that I can study and play around with? Preferably in C++ language or matlab. I have r...

How to serve high-resolution imagery in a low-resolution form using C#

Trying to use 300dpi tif images for display on the web. At the moment, when the user uploads an image, I am dynamically creating a thumbnail. If a page is created referencing the high-res image with a width of 500x500px, can I use the same functionality to convert to a gif/jpg on the fly. What is the impending resolution of the jpg that ...

Java: using WritableRaster.setRect to superimpose an image?

I have been playing with some of the imaging functionality in Java, trying to superimpose one image over another. Like so: BufferedImage background = javax.imageio.ImageIO.read( new ByteArrayInputStream(getDataFromUrl( "http://www.google.com/intl/en_ALL/images/logo.gif" )) ); BufferedImage foreground = javax.imageio.Ima...

how to sketch a polygon in a matrix or binary image in order to use image processing functions?

I'm developing a matlab program in which I uses polygons(concave or convex). I need to use image processing functions like imdilate or imerode and etc on the polygons. To this end, I should convert my polygons to image. I wonder whether there is a way to sketch a polygon directly in a binary matrix (1's for foreground and 0's for backgro...

Can Silverlight do the following?

Hi folks, Can i do the following in a silverlight page/app? (Note: the silverlight app will be embedded on an ASP.NET MVC website page) :- Display an image from a resource: eg. www.someDomain.com/image.png Url of the image to display is passed into the control (ie. it's not hardcoded, but .. say .. entered into a textbox via the user,...

Merging two Images with CodeIgniter Image Manipulation Class

I am developing a new project in CodeIgniter (CI), and would like to find a CI solution to this current issue. I've got one image, which resembles a picture frame. I would like for uploaded images to be modified to have this frame in their background. Example: The first picture is the frame. The second is the uploaded image (after res...

C# - Block code from executing in the designer

I'm executing a line of code that fails to execute within the designer, causing all of my control's public properties to no longer show up in the designer. Because of this I can no longer see any of my forms that use that control in the Visual Studios Design View. The line of code in question calls an unsafe code project that does a bit...

Why are JPEG images created with System.Drawing larger than original Bitmaps?

I'm having a strange problem - I have about 14.5 million bitmap images, that are supposedly uncompressed. I need to convert these bitmaps to JPG and store them in a database. When I use the classes provided in the .NET System.Drawing library to save the bitmap as a ImageFormat.Jpeg, the resulting JPEG is about twice the size of the ori...