image

How to check if file is/isn't an image without loading full file? Is there an image header-reading library?

edit: Sorry, I guess my question was vague. I'd like to have a way to check if a file is not an image without wasting time loading the whole image, because then I can do the rest of the loading later. I don't want to just check the file extension. The application just views the images. By 'checking the validity', I meant 'detecting and...

Loading an image in Python (Error) part_2

This code didn't show my picture. The picture really exists :) Does anybody know why this doesnt work? Thanks in advance! from PIL import Image im = Image.open("D:\\Python26\\PYTHON-PROGRAMME\\bild.jpg") im.show() ...

How can I load a Image from a file, then an image to a bitmap?

I have a file location on my file system. I need to first load the file into a System.Drawing.Image, then I need to load the Image into a bitmap. ...

JavaScript - Detect if an image is present by using its src tag

I've been trying to learn this myself several hours and just had to give up and plead for mercy. I'm writing a greasemonkey script that interacts with my work OWA (Outlook Web Access), nothing fancy at all. The goal is to find and count the number of times an image (which has no name or id) exists within my 'inbox'. Here's my simple t...

Can't read images from C:\ in ASP.NET

I realize this is an edge case, but it seems that asp.net doesn't allow reading images from the root drive. To test this I wrote the following very simple application: On the page I have: <asp:Image ID="test" runat="server" /> In the code behind I have: test.ImageUrl = @"C:\test\image.jpg"; test.AlternateText = File.ReadAllText(@"C:...

How to copy a remote image to my website directory?

I post pictures from other websites and I would rather have those on my servers, in case their server dies all of a sudden. Say the file is located at "www.www.www/image.gif", how would I copy it to my directory "images" safely? I write in PHP. Thanks! ...

wxPython GridSizer not attached to panel?

I'm trying to build a level editor for a game I'm working on. It pulls data from a flat file and then based on a byte-by-byte search it'll assemble a grid from pre-set tiles. This part of the app I should have no issues with. The problem is that my test version of the editor which just loads a 16x16 grid of test tiles from 00 to FF is lo...

please help me to show image in gridView when image source is defined in datatable

i have got a datatable in witch i have got image url. i dont want to create a tamplet column. i just want to assign my datatable as datasource of gridview and it should show image in its field like: dim dt as new datatable dr = dt.NewRow dr("HotelName") = "citypalace" dr("image") ="<img src='" & "www.mycity.com/aa.jpg" & "'/>" 'but t...

Python: Colorbands in the PIL-Module

I have this code from the PIL-handbook but I get an error message. from PIL import Image, ImageEnhance, ImageChops im = Image.open("D:\\Python26\\PYTHON-PROGRAMME\\bild.jpg") # split the image into individual bands source = im.split() R, G, B = 0, 1, 2 # select regions where red is less than 100 mask = source[R].point(lambda i: i < ...

IE image display problems..

hey folks, i'm working on a site at the moment: companhiadopijama.com.br/new and i'm having the weirdest issues with IE (7 & 8).. 6 i don't care so much about atm. my PNG's are displaying with a partial black background on hover (in my menu) & my JPG's in the jquery roundabout are first showing up, then changing to white to black gradi...

How to make IE fireevent on Client Side Image Map

I need to simulate a mouse click using IE on a client side image map. Which object should invoke the fireEvent()? It cannot be simply the <area> object since it could be referenced by 2 different <img>s. It cannot be the <img> since we need a way to tell which part of the img is clicked which is defined in the <area> tag? I've done som...

What's a good pixelation algorithm in C# .NET?

What is a good algorithm for pixelating an image in C# .NET? ...

How do I get access to an image of the desktop buffer in .NET ?

I am making a very simple app in C# with Visual Studio, so I'm using that Forms package. I need to get access to an image of everything below it, so that I can manipulate the image. How can I do this? It doesn't have to be real time very much, since I'll probably be polling it not more than say 10fps. ...

Convert an image to RGBA mode with python

I tried the code listed at Using PIL to make all white pixels transparent to convert some .ico files to .png images with transparent background. It doesn't work on all .ico images, some time it just outputs an image with black background. Sample .ico files can be located here ...

Cubic image converter?

I am looking for software (preferably free) that runs on either windows or osx that can take a list cubic images (broken into front, back, up, down, left, right) and turn them into a video. I am also looking for software to create fisheye projections from these images. Have had a bit of a look around and can't seem to find anything that...

Codeigniter and SWFObject

Hello, I'm building a website using Flex, Codeigniter, and I use swfobject to embed the swf. This will not work if I access the website using Codeigniter's index.php file. This is the ouput source: <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <base href="http://localhost/Pixelatte-debu...

Is there ANY way to write an image to the Win32 Console?

Is there any way to write an colorful image to the Win32 Console? I don't care in which language, but C/C++/C# would be preferred. Thanks. ...

Images don't show up in IE8

As part of my job post announcements to a proprietary, password-protected site. There is no HTML control in the announcement panel nor is there a button that allows you to insert an image. I've worked around these limitations by making my own basic HTML pages with tables with images using the "img" tag. I open the HTML page in Firefox, t...

Silveright image source on web not showing anything

I'm sure that this is a simple newbie question, but the answer is eluding me right now. I have the following control compiled in Silverlight 3: <UserControl x:Class="SLImageTest.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http:/...

Image resize,crop with gd afresh every time or caching?

I found this really nice function that receives your desired proportions and resizes/crops the image for you. The function requires ImageMagick to work. Will it be better to cache the image or resize it every time? I'm pretty sure using gd will be slower than caching, but it won't require me to use ImageMagick, and I still haven't succe...