image

Setting an image for a UIButton in code.

Hi, How do you set the image for a UIButton in code? I have this: UIButton *btnTwo = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btnTwo.frame = CGRectMake(40, 140, 240, 30); [btnTwo setTitle:@"vc2:v1" forState:UIControlStateNormal]; [btnTwo addTarget:self action:@selector(goToOne) forControlEvents:UIControlEventTouchUpInside];...

Using an image file vs data URI in the CSS

I'm trying to decide the best way to include an image that is required for a script I've written. I discovered this site and it made me think about trying this method to include the image as a data URI (defined by RFC 2397) since it was so small - it's a 1x1 pixel 50% opacity png file (used for a background) - it ends up at 2,792 bytes ...

What is the better way to create thumbnails from video in PHP?

I ma creating a video broadcasting site, in which i need to know how to create thumbnails from the video. Please Help. Any Suggestions or References will be highly appreciated ...

jQuery Image picker

Hi all, I'm looking for a imagepicker in jQuery. It should work similar to Gmail's way of attaching images to contacts: There is an clickable, empty image When clicked, a popup shows up with all the images and a searchbox When a image is clicked, the popup disapears and the clickable image changes Mootools or Prototype or even plai...

JavaScript Image Popup Window

I would like to setup my gallery web page so that when a user clicks on the thumbnail image, a window pops up displaying a larger view of the image. I do not mean a pop up window as in a browser window but a window that is loaded within that same page and can be closed. I am not exactly sure how I would go about doing this. Any ideas?...

Is there some easy way to detect if a file has EXIF data?

Is there some cheap and reliable way to detect if an image file has EXIF data? Something like "read the first 100 bytes and search for EXIF substring" is highly preferable. I don't need to read and parse it - only to know if it is there. The key is that it must be very fast. C++ is preferable. ...

How can I retrieve an image from SQL Server using ASP.NET MVC with the EF?

I have seen other questions about this, but I have not seen a complete solution for this. I am using ASP.NET MVC with the Entity Framework, and I have a SQL Server database using an image datatype. View: <% foreach (var v in (IEnumerable<MyNamespace.Models.MyObject>)ViewData.Model) { %> <span> <%= v.Name %> </span> ...

Reading "People Tags" inserted by Windows Live Photo Gallery

Photo Gallery gives you the ability to mark a person's face and apply a tag to it. I understand it inserts tags directly into the file rather than store it off in a database or accompanying metafile anywhere. So if that's true, what data is it inserting and how is it formatted? ...

Organizing Images By Color

Maybe you've noticed but Google Image search now has a feature where you can narrow results by color. Does anyone know how they do this? Obviously, they've indexed information about each image. I am curious what the best methods of analyzing an image's color data to allow simple color searching. Thanks for any and all ideas! ...

What is the fastest way to do image rotation in PHP without using GD's imagerotate?

I do not have the ability to use PHP's GD imagerotate() function, so I need to find another solution. I used the rotateImage() method found in the comments of the imagerotate() PHP help page, but it is very slow on large images. I am horrible at image math, and am having a hard time formulating the correct Google search to get me pointe...

How to grab byte[] of an Image in java?

I have a url of an Image. Now I want to get the byte[] of that image. How can I get that image in byte form. Actually the image is a captcha image. I am using decaptcher.com to solve that captcha. To send that captcha image to the decaptcher.com through its API, the image should in in bytes array. That's why I want to get the image at ...

Custom Drawing of Alpha Images

Hello, I am trying to do custom drawing of an image(with alpha) and eventually going to apply different color tints to it. Right now I am just trying to draw it correctly. This might be simple problem but the result is the ALPHA on my image is black. Image is .png created from photoshop with correct alpha. - (void) drawRect:(CGRect)area...

Preloading/precaching images with JS isn't working the way I want it to; what am I doing wrong?

I'm trying to preload about 200 images using the following: var total_images = 0; var loaded_cnt = 0; var tempImg = new Object(); function precache_array(a,path){ for(var i = 0; i < a.length; i++){ tempImg[path + a[i]] = new Image(); tempImg[path + a[i]].src = path + a[i]; tempImg[path + a[i]].onLoad = image_loaded(a...

How can I make a snapshot image of a web page in php?

I am using php and I want to take a snapshot of my web page using php. Something similar to this http://www.moneycontrol.com/gd/mail%5Findices.php How can i do that? ...

iPhone App is leaking memory; Instruments and Clang cannot find the leak

Hi, i've developed an iPhone program which is kind of an image manipulation program: The user get an UIImagePickerController and selects an image. Then the program does some heavy calculating in a new thread (for responsiveness of the application). The thread has, of course, its own autorelease pool. When calculation is done, the seper...

Add an image to count down script

I want to add an image next to "Click here to Download" Meaning when count down is over it should look something like this: Click here to Download and this image should be beside it http://svastara.info/.s/img/icon/download1.png <script type="text/javascript"> <!-- var count=30; var obj; window.onload=function() { obj=document.getEleme...

Putting colors on an image in C#

I've used this piece of code to put an image in a variable. What I wanna do is draw dots on it on various places and then save the result. What I do is I open a dialog to select the file and to check if it worked, I put it in a picturebox. Using winforms offcourse. Using Visual Studio 2008 Professional. EDIT:the openImg variable you se...

Grab an image via the web and save it with Python

I want to be able to download an image (to my computer or to a web server) resize it, and upload it to S3. The piece concerned here is: What would be a recommended way to do the downloading portion within Python (i.e., don't want to use external tools, bash, etc). I want it to be stored into memory until it's done with (versus downloadi...

Is there an easy way to install RMagick?

I am trying to install RMagick on my slicehost(Linux Hardy) instead of compile from source, here is what I did: $ sudo aptitude install -y imagemagick $ sudo aptitude install -y libmagick9-dev $ sudo gem install rmagick After installed, it reads GIF with no problem, however for JPEG and PNG, I keep getting this error: Magick::ImageMa...

Why can't I crop this image in Python PIL? (simple syntax problem?)

from PIL import Image im = Image.open(f) #the size is 500x350 box = (0,0,100,100) kay = im.crop(box) It seems like there's nothing wrong with this, right? That last line will result in an error and won't continue, but I don't know what the error is because it's AJAX and I can't debug ATM. ...