image

Recognizing tetris pieces in C

Hello!! I have to make an application that recognizes inside an black and withe image a piece of tetris givem by the user. I read the image to analyze into an array. How can I do something like this using C? Thanks and best regards. ...

How to check if a file is a valid image file?

I am currently using PIL. import Image try: im=Image.open(filename) # do stuff except IOError: # filename not an image file However, while this sufficiently covers most cases, some image files like, xcf, svg and psd are not being detected. Psd files throws an OverflowError exception. Is there someway I could include them ...

Image Rendering Test

I am benchmarking a custom brower and want to benchmark the rendering speeds of different types of images (gif, jpg, png) of the same file size to see which of the image formats this browser renders the fastest. My process was just to have a simple seperate HTML page for each type of image and just use a Javascript counter before it is ...

WPF: Skinning with Images

There are a lot of samples around showing how to skin WPF applications using DynamicResources and ResourceDictionaries loaded dynamically from .xaml files. My problem is that my skins use images and I would like to include the style definitions and the images in a single file, so that a user only needs to download this. Any ideas how t...

Resizing images and performance

I have an image that is around 1200 x 400 (if I remember right), and is about 50kb in size. I use the image in a header for a website, but I constrict the height of the image to 100px in order to make it fit my header. <asp:Image ID="imgLogo" runat="server" ImageUrl="~/Images/AFact.jpg" Height="100px" /> Is this a bad practice? Does ...

What is the best way to create a realistic highlighter in .NET (using GDI+)?

How can i create a realistic highlighter (simulating a real world highlighter pen) in .NET using GDI+? It is meant to be used on a graphics object not on selectable text. Using a transparent brush (with alpha channel) doesn't do the job since everything below the area covered by the brush gets "fuzzy", and i would like the "foreground" ...

What graphic format can I use for layers?

I need to be able to take multiple images and save them to a file that can then be read by a graphics program like Photoshop or Illustrator and edited. I need to be able to do this in a C#/.Net environment. It looks like PDF's have the capabilities to do layers but I am not sure if any of the free components like PDFSharp will support ...

Visual Basic 2008 - Image Not Showing Up - Program Freezes

The program starts. When I click the Start button the original form disappears just as I intended, but then it just hangs there. No picture shows up. The CPU heats up and gets louder. It freezes and I sometimes have to CTRL+ALT+DELETE just to exit the program. 'Reaction.exe 'Picture comes up once, user presses left side of keyboard (...

How to display boxes over an image with JQuery?

Hi all, I currently have an image that I want people's annotations to show up on, where the annotations actually have an x,y coordinate relative to the image, as well as a width and height. Let's say for now the annotations don't actually have text in them -- they'll just be empty boxes. I'm wondering what the best way to display an em...

How to convert a Pyglet image to a PIL image?

i want to convert a Pyglet.AbstractImage object to an PIL image for further manipulation here are my codes from pyglet import image from PIL import Image pic = image.load('pic.jpg') data = pic.get_data('RGB', pic.pitch) im = Image.fromstring('RGB', (pic.width, pic.height), data) im.show() but the image shown went wrong. so how to conv...

How can I create an image dynamically on AppEngine

I have an application hosted in Java on AppEngine and I would like to add a feature where users can get a graphical summary of their data. BufferedImage is listed as not supported on AppEngine. The display process will be simple--a series of small squares in one of two colors. Regards, Kent ...

How do i show image animation on iphone

I have a animated gif ( like this one ) , when I show in an image view on my iphone app it just shows the first frame . This behavior is consistent with the apple documentation . I was wondering what is the best way to achieve this on the iphone ? ...

Flex/AIR: Sending email with embedded image.. how?

I'm making e Flex AIR application that will produce a giftcard from a webcampicture. This giftcard needs to be sended in an e-mail to a recipient provided in the program. Should I upload the picture to a server and use php to send the mail? ...

Saving a Numpy array as an image

I have a matrix in the type of a Numpy array. How would I write it to disk it as an image? Any format works (png, jpeg, bmp...). One important constraint is that PIL is not present. ...

Detect if image is loaded on page.

My question is not like this one: Browser-independent way to detect when image has been loaded I have advertisements on my site for which I get paid per impression, now recently I have seen a dramatic drop in the number of impressions that each ad has been getting however I have been getting more average hits/month. Is it possible for ...

Sharpen on a Bitmap using C#

I want to put a sharpen filter on an image. I have found a web with short tutorial. I tried to do it in C# so here is my code. Anyway, I tried to find out why it is not working. I do not know if I am doing something wrong, if yes, please advise me what to do to make it work as it should be. Thanks public static Bitmap sharpen(Bi...

ASP.NET: Bold words in text on image

I'm trying to dynamically write text to an image, but I would like to boldface a selected word in the sentence. What I did is separate the string into three strings, the first part, the word to be boldfaced, and the remainder of the sentence. When I attempt to draw them onto the image (.DrawString()), however, they don't concatenate, but...

How do I determine an image url string is without a base domain through javascript?

I'm capturing data from an external url using php and throwing it back to my page via ajax to load images. My problem is the external url have some images that are relative("images/example.jpg") so I have to prepend their base domain("http://www.example.com) so I can load it in my page. Problem is some of the images includes a base domai...

Image in datatable

I read image by using OpenFileDialog. Sample code is below: openFileDialog1.ShowDialog(); if (openFileDialog1.FileName != null) if (picBoardImage.Image != null) { picBoardImage.Image.Dispose(); } picBoardImage.Image = Image.FromFile(openFileDialog1.FileName); I want to store this image in datatable. How can I do that? ...

How to use WindowsPhotoGallery to display a gif image with Java ?

I use the following code to display a gif image in Java by calling a runtime command, it opens the WindowsPhotoGallery, but doesn't display my image, instead it shows a bunch of other pictures on my PC, my question is : how to pass the gif image file name to it properly, so it will open with my image. Now I'm passing it like this : C:\...