image

C# - How to convert an Image into an 8-bit color Image?

I need to convert a PNG Image loaded from a file into an 8 bit-per-pixel byte array used by another device (embedded programming). I'm copying over pixel by pixel into a new Image created with a 16-bit color - Format16bppRgb565, but I need Format8bpp, which is not present in the .NET Framework. (I cannot use Format8bppIndexed since the ...

how to show *.mpp files in my iphone application?

Hi, I have a problem in showing *.mpp (microsoft project files) in my app. I thought of showing in image format but i dont know how to convert it into image format. or is there any other way to view mpp files. thanks in advance ...

C# - Copy an Image into an 8-bit Indexed Image

I want to create an 8-bit indexed image from a regular 32-bit Image object. Bitmap img = new Bitmap(imgPath); // 32-bit Bitmap img8bit = new Bitmap(imgW, imgH, Format8bppIndexed); // 8-bit // copy img to img8bit -- HOW? img8bit.Save(imgNewPath, ImageFormat.Png); I cannot use SetPixel to copy it over pixel-by-pixel since Graphics doe...

Testing complex datatypes?

What's are some ways of testing complex data types such as video, images, music, etc. I'm using TDD and wonder are there alternatives to "gold file" testing for rendering algorithms. I understand that there's ways to test other parts of the program that don't render and using those results you can infer. However, I'm particularly interes...

Image Uploading and Previewing with Jquery

Hi Everyone.. Does anyone know a good plugin to upload and preview an image using jquery....? I've been googling this for a long time and still can't find any....!!! Thanks and Regards... ...

WMF / EMF File Format conversion C#

In my program, I have a requirement to "playback" or "parse" windows metafiles (WMF and EMF). I have dug through MSDN and Google, and the closest I have come is the Graphics. EnumerateMetafile method. I can get it to work, in that my EnumerateMetafileProc callback is called, and I can then call PlayRecord. What is missing, is how to get ...

Display an image in WPF without holding the file open

I'm working on an image management app in WPF that displays a number of images and allows the user to move them around the file system. The issue I've run into is that displaying a file with an <Image> element appears to hold the file open, so attempts to move or delete the file fail. Is there a way to manually ask WPF to unload or rel...

Cached image problem

Hey all. Right, my problem is that I need to replace an image that appears on every page of a site, which is fine, the problem is I want every user to see the new image and not a cached version of the old one. This is made especially difficult because I can’t make any code changes (far too many places to do it for it to be viable) so I...

Saving/Loading Images from/to stream instead of a disk

I have the following code which takes an improperly saved Image from the database converts it to a Jpeg and returns the Image in a byte array; public Byte[] GetImageFromDB(int id) { var imageData = _repository.GetImage(id); var newImageData = ConvertCorruptedImage(imageData, id); return newImageData; ...

Whats wrong with IE7 Image scaling Width to 100%? Fine in IE8

IE7 does not resize the images properly with CSS My page looks perfectly fine in FF and IE8 - exactly like it should. But for some reason on IE7 it does no properly resize the images down to 100% of the parent container, which is set at 30% of the page width. The images are just 100% width of the full image. How do I make it look like ...

jQuery: Easiest way to wrap an image tag with an A anchor tag

This is a simplified version of my problem. I have two buttons, and one image. The image code is something like this <img class="onoff" src="image.jpg"> When I press button one I want the image to be wrapped in an A tag, like <a href="link.html"> <img class="onoff" src="image.jpg"> </a> And when I press the other button, the A ta...

PHP Accurate Font Width

Hi, I am trying to generate a text image. So I create a new font: $font = '../fonts/Arial.ttf'; Then I add some background for the text imagefilledrectangle($image, 0, 0, ?, 12, $green); And add text imagettftext($image, 12, 0, 0, 12, $white, $font, $text); The problem is right now I don't know how to get the width o...

In WCF how do I return a class that contains a System.Drawing.Image property?

I have a WCF service which exposes a method that returns an array of objects which contain an Image property (see code below). In the same solution, I have a class library project which has a service reference to my WCF project. In the class library, when I attempt to "Update Service Reference" my proxy class becomes unavailable. When...

jQuery smooth image change

Hi there... I wonder how to make image change in my jQuery script smoother. I also have an animate() chain, can I attach the "src" change into it or not? Sadly I can't use images as CSS backgrounds... Here's a little sample... function growBigger(element) { $(element) .find(".inside") .animate({ width: curWidth, height: curHe...

Converting a visio to a JPG image

I have a .vss type file which I want to convert to an image format (like JPG/GIF). Is it possible to do this and if so, how? ...

How to fetch attributes of image in silverlight?

Hello, I am loading an image to my silverlight application. This image will fit in a 3d model as a texture map. I need to fetch image attributes. For that I am using ImageOpened event, like this: public MainPage() { BitmapImage img = new BitmapImage(new Uri("imagens/textura.jpg", UriKind.Relative)); img.ImageOpened...

How to show image from Byte array??

Hi to All, I have the code which returns image from function by taking input parameter as a byte array. How to catch that image & show it on aspx page with asp control. ASP control have imageurl property & not have image property. Please reply.... Regards, Girish ...

Paint event handler stops executing after a few iterations

Hi, I've got a Windows Form that circulates through images which are displayed on the form as a slideshow. The way I'm doing this is to have a Panel control the size of the form it resides in, and add an event handler that draws an Image object that exists in memory. void panel_Paint(object sender, PaintEventArgs e) { if (_bShowImage...

restful image url obfuscation and click tracking

Hi There. I am wondering if anybody out there could explain or provide online examples (yes, I have already done a lot of googling for this) of how to: conceal the images that users are uploading to our site and how to track clicks of those images I noticed that a popular site out there has the following for an image url: http://...

Embedding background images in an e-mail

Hi, I'm trying to use an embedded image in an e-mail as the background image, i've got the following code to embed it: LinkedResource backgroundLink = new LinkedResource("..\\..\\background.gif"); backgroundLink.ContentId = "BackgroundImage"; backgroundLink.TransferEncoding = System.Net.Mime.TransferEncoding.Bas...