image-manipulation

WPF Listbox with images - how to detect if an image didn't download

I have a wpf ListBox, and each item has an image that the list needs to download from a server - the list definition looks like so: <ListBox x:Name="List" BorderThickness="0" AlternationCount="2" ItemContainerStyle="{StaticResource alternatingWithBinding}" HorizontalContentAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisib...

Using ImageMagick from Command line in .Net?

I am using ImageMagick from Commandline in .Net? Although a .Net wrapper (ImageMagick.Net in codeplex) is available but it is still in alpha and does not have implementation for all the command line options e.g Distort, Montage. Therefore I am using System.Diagnostics.Process class to invoke the ImageMagick command line. What are the P...

Need PhotoBooth Mac feature in iphone app

Hello All, Have a look on following application http://itunes.apple.com/us/app/fatbooth/id372268904?mt=8 i think they are using the same feature provided my PhotoBooth MAC. Please suggest any api or any other possible solution so that I can build an iphone application Thanks ...

How to Save Controls that are inside a form.

Hi this question or problem i have its very hard i have search and ask in the university and i have no idea how to make this happen, or even if it is possible. Here we go... I am making a photo or image editor with the variation of letting the user to insert buttons in top of the edited image(this buttons when clicked plays an audio fil...

Template matching - Image subtraction

I have a project where I am required to subtract an empty template image from an incoming user filled image. The document type is a normal Bank cheque. The aim is to extract the handwritten fields from it by subtracting one image from the empty template image. The issue what i am facing is in aligning these two images, as there is sca...

High quality image re-sampling in Mono/C#/ASP.NET

I've developed a site that requires high quality resizing of uploaded photos. The site works perfectly under ASP.NET on Windows. This afternoon I tried running it under Mono/Apache/Ubuntu 10.10. To my surprise, it worked - except for the image resampling. It seems the libraries underlying Mono's Graphics/GDI+ implementation don't imple...

If I am using .Dispose(); why I continue having an Out of memory.

I am using C# 3.5 .NET and Windows Form I have this code to manage the Brightness of an image, it activates when the trackBar ValueChanges public void brightnesstrackBar1_ValueChanged(object sender, EventArgs e) { domainUpDownB.Text = ((int)brightnessTrackBar.Value).ToString(); B = ((int)brightnessTrackBar.Value); ...

Commands for ImageMagick to create thumbnails

Given an photograph uploaded by a user, what is best approach to creating a number various sized thumbnails Using ImageMagick (or GraphicsMagick)? My guess to the steps: Create a super sample of the image, maintaining original aspect ratio Apply watermark to super sample Create the various sized thumbnails using the watermarked super s...

find proportional resize dim which should be less than or equal to the needed thumb dim

I php need to resize an image so that both width and height after resize should be less than or equal to the expected resized values. consider the source image is 680x520 The needed thumbmail size should be <= 300x200 I want to find the resized proportional value which should be less than or equal to 300x200. it can be like 299x199 o...

How to make UIButton use a masked image correctly?

I’m creating a UIButton programmatically and then adding a masked image with setImage: CGRect photoFrame = CGRectMake(11, 11, 180, 120); UIButton *cardPhotoButton = [[UIButton alloc] initWithFrame:photoFrame]; cardPhotoButton.backgroundColor = [UIColor clearColor]; UIImage *cardPhoto = [[UIImage alloc] init]; cardPhoto = [self maskImag...

Silverlight Image: how to invert or negated image colors?

The problem is how to invert colors of a Silverlight Image element. There is an Image with a JPG as a source. On a button click I need to invert the colors. Sounds simple, right. Take each pixel, then modify it's value by 255 - pixel value. But when I tried WritableBitmap loaded with the Image source, I got security exception disall...

What could cause a "color index out of range" error for imagecolorsforindex()?

When doing a patch resize to a big bunch of JPG, PNG and GIF files, PHP drops dead quite unexpectedly with the following error message: imagecolorsforindex() [function.imagecolorsforindex]: Color index 226 out of range The relevant code fragment is: protected function preserveTransparency($img, $resized, $ftype) { if (($fty...

C# image manipulation using a console application throwing 'Out of Memory' Exception

I have a console application that successfully re-sizes an image while maintaining aspect ratio. I now need to crop the image the code I am using is below: using (var thumbnail = CropPicture(image, rectangle)) { EncoderParameters encParams = new EncoderParameters(1); encParams.Param[0] = new EncoderParameter(System.Drawing.Imag...

Image manipulation

I need the easy to learn & fast method for generating image from background image, texts and after that saving as JPEG format. What you can suggest? Any library or tutorial on this? Important criteria is simpleness. ...

How to reduce the size of an image in C# and .NET 3.5?

I have a screen shot I take in my mobile app. The screen shot takes about 32 KB when saved as a png on a disk. I am sending these to a central SQL Server and 32 KB is too big for that amount of times I will need to store that screen shot (approx 2500 times a day). Is there any kind of trickery that I can do to get it to save smaller? ...

Convert an image to 16 bit color depth

I need to take a screen shot and convert that screen shot to a 16 bit color depth. I am using C# and .net cf 3.5. I think I could adapt this solution to do it, but I want to know if that is overkill. Is there a way to do this just using .NET CF (ie, no/less p-invokes.) If it can be done just using .NET CF then it would be easier on...

Image/color manipulation formulas

I know how to do simple things with images at the pixel level like applying grayscale, sepia, etc. I'd like to find some articles on how to apply saturation, hue, brightness, contrast, etc at the pixel level, and I'm having trouble getting anything useful from my google searches. ...

javascript preloading images - check whether an image is cached/loaded to prevent preload

I have a few doubts which i am already sure of it but still want to be very precise about it. If this is a duplicate question then please give me links so that i will delete this question and will refer the provided links I need to preload few images. I dont want to preload if they already exists in the browser cache. if we are preloa...

How to convert CVPixelBufferRef from kCVPixelFormatType_32ARGB to kCVPixelFormatType_24RGB

I'm a new Apple developer and I'm struggling with the different image representations... I would Have a CVPixelBufferRef in kCVPixelFormatType_32ARGB format, and I would like to create a new kCVPixelFormatType_24RGB CVPixelBufferRef from it (i.e. discarding the alpha bits). Is there a simple way to do it, or do I have to copy it with ...

imagemagick compare -metric rmse result interpretation

hi All, i did the following to get difference between two png files: compare -metric rmse a.png b.png null: result i got is: 3374.35 (0.0514893) i am running it on windows. Can you please tell me what those numbers mean? Does the b.png deviates too much from a.png? Can you give me link, if possible, where I can read on results e...