image-manipulation

C# image whitespace

Hi there, I have an image that is 240x320 (iphone camera image in portrait), and I need to programmatically (in C#) add white "bars" to the sides increasing the full image size to 320x320. I don't want to scale the image because that would mess up the aspect ratio. I have found a lot of info about how to remove white bars with c#, but...

C# Autolevel snippet?

Has anyone seen any good snippets for autoleveling an image in C#? ...

C# Image Deskew

Has anyone seen any image deskew algorithms in c#? I have found: http://www.codeproject.com/KB/graphics/Deskew_an_Image.aspx but unfortunately, it doesn't do very much for images without text. I am specifically trying to auto deskew an image of a book with solid edges, but minimal text. Has anyone seen anything that may be able to do ...

How to convert Java Image into JPEG array of bytes?

Is there a way to convert a Java Image, encode it into JPEG (but not saving it to a file), and store it as an array of bytes? (byte[]) I need the JPEG-encoded image as an array of bytes. ...

GD! Converting a png image to jpeg and making the alpha by default white and not black.

I tried something like this but it just makes the background of the image white, not necessarily the alpha of the image. I wanted to just upload everything as jpg's so if i could somehow "flatten" a png image with some transparently to default it to just be white so i can use it as a jpg instead. Appreciate any help. Thanks. $old = imag...

Serverside image processing

I am designing a web application that does server side image processing in real time. Processing tasks include applying different effects like grayscale, blur, oil paint, pencil sketch etc on images in various formats. I want to build it using java/servlets which I am already familiar with. I found 3 options, 1) Use pure java imaging li...

How do I load and show a PNG image in MATLAB?

>> I = imread('D:\Works\matlab\SecCode.php.png','png'); >> imshow(I); The above code always shows an all-black image. What's wrong with it? The image I'm using is this one: ...

Convert a image to a monochrome byte array

I am writing a library to interface C# with the EPL2 printer language. One feature I would like to try to implement is printing images, the specification doc says p1 = Width of graphic Width of graphic in bytes. Eight (8) dots = one (1) byte of data. p2 = Length of graphic Length of graphic in dots (or print lines) Data =...

how do i edit this transparent png keeping the same font

i want to change the wording, and leave everything as it is.... http://i42.tinypic.com/27wyyo.png what software do i use ? ...

php adding images to another image, exact positioning

I have a cool snippet of code that works well, except one thing. The code will take an icon I want to add to an existing picture. I can position it where I want too! Which is exactly what I need to do. However, I'm stuck on one thing, concerning the placement. The code "starting position" (on the main image: navIcons.png) is from t...

BufferedImage & ColorModel in Java

I am using a image processing library in java to manipulate images.The first step I do is I read an image and create a java.awt.Image.BufferedImage object. I do it in this way, BufferedImage sourceImage = ImageIO.read( new File( filePath ) ); The above code creates a BufferedImage ojbect with a DirectColorModel: rmask=ff0000 gmask=ff0...

Need a explanation for the matlab code snippet

%# load a grayscale image img = imread('coins.png'); %# display the image figure imshow(img,[]); %# false-color colormap('hot') The above code is from here: http://stackoverflow.com/questions/2592755/infrared-image-processing-in-matlab/2592793#2592793 But I don't understand how figure(What's the difference with/without it?) and col...

How to resize .jpg images in Java?

This is what I want to do: Input: ArrayList that contains a bunch of .jpg URLs Download the image (using HttpURLConnection maybe?) Resize Save as xxx.jpg, locally I don't know where to start. I'd appreciate if anyone can tell me what to study to do the steps 1~3. ...

Get remote image dimensions

Given a URL to an image (and not the image itself), what's the most efficient of getting it's dimensions? I would like to change the height and width attributes in the image tag (<img>) if it is greater than 200x200. However, if it's smaller than that, then I'd like to keep the size as it is. (I'm using ASP.NET/C#) ...

Wrong image dimensions when it's dynamically loaded on a page the 1st time

I have the following piece of Javascript code on my web-page var central_image = document.createElement("img") central_image.setAttribute("src", imgs[curr_image_no - 1]); central_image.setAttribute("name", "jpeg"); document.getElementById("photo").appendChild(central_image); central_image.onload = getDimensions(); //function that alert...

java tomcat: what library should i use to convert images to jpg and create thumbnails on-the-fly?

Hello. I have a form that accepts image file, i want to be able to convert this image from any common format to jpg and to create a thumbnail. what's the recommended method to achieve such a thing? Working with latest apache-tomcat on a gentoo linux server. thanks ...

Does white color has a fixed value(1 IMO) in an RGB image in MATLAB?

Or say does 1 denotes white for an RGB image? I have this question because of this answer: http://stackoverflow.com/questions/2619668/how-to-convert-a-grayscale-matrix-to-an-rgb-matrix-in-matlab/2619714#2619714 Can someone clarify it? ...

Get remote image using cURL then resample.

I want to be able to retrieve a remote image from a webserver, resample it, and then serve it up to the browser AND save it to a file. Here is what I have so far: $ch = curl_init(); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, "$rURL"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEA...

How to upload and size a profile picture for a site?

I have a site that has a profile page and I would like to allow the users to upload an image for the profile picture. I forsee a problem if the user select an image that is larger than what I am allowing for the site. Is their a good refrence or example how to accomplish this? The site is developed in Visual Studio 2008 with VB.NET 3....

What's a good matrix manipulation library available for C ?

Hi, I am doing a lot of image processing in C and I need a good, reasonably lightweight, and above all FAST matrix manipulation library with a permissive license. I am mostly focussing on affine transformations and matrix inversions, so i do not need anything too sophisticated or bloated. Primarily I would like something that is very f...