image

PHP: imagepng is creating inordinately large files

I'm using a simple thumbnailing script I wrote and it's pretty standard: $imgbuffer = imagecreatetruecolor($thumbwidth, $thumbheight); switch($type) { case 1: $image = imagecreatefromgif($img); break; case 2: $image = imagecreatefromjpeg($img); break; case 3: $image = imagecreatefrompng($img); break; case 6: $image = imagecreate...

Get file size of BufferedImage before writing the data

I'm working on a Java program that needs to send an image (preferably in PNG format, though I could perhaps use another format if necessary) over the network. The logical way to do this is, of course, to first send the length of the PNG image data, then the data itself. Problem: I don't see any method in ImageIO or anywhere else that wil...

PHP - Resize an image and fill gaps of proportions with a color

I am uploading logos to my system, and they need to fix in a 60x60 pixel box. I have all the code to resize it proportionately, and that's not a problem. My 454x292px image becomes 60x38. The thing is, I need the picture to be 60x60, meaning I want to pad the top and bottom with white each (I can fill the rectangle with the color). The...

Save UIView's representation to file.

What is the easiest way to save UIView's representation to file? My solution is, UIGraphicsBeginImageContext(someView.frame.size); [someView drawRect:someView.frame]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); NSString* pathToCreate = @"sample.png"; NSData *imageData = [NSData dat...

Looking for a managed image parser library (JPEG, BMP, PNG, GIF)

I am writing a discussion board software that will have "avatar" images for the users. I want to resize any picture that gets uploaded to a reasonable size. I could easily do that with System.Drawing but that is relying on GDI+ which has hat security problems before. The problem is that the images are untrusted. So I thought of using a f...

need to crawl images and the whole web pages

hey, I am starting a project and wonder the relationship between the characters in images and the whole web page where the images reside. so first, i want to crawl some images and their web pages.....need to save the crawl result in local disk for further analysis. I wonder if there is any open source for this issue? thx^_^ ...

about visual basic 2005 browser with imagaes

the browser of visiual basic 2005 doesn't display JPEG images , it only displays PNG and GIF is there any way to display it? ...

Image Size With J2ME on an HTC Touch2

I'm trying to ascertain wither there is a limitation on the camera access in the j2me implementation on the HTC Touch2. The native camera is 3MP however it seams that the quality is notably reduced when accessed via j2me, in fact it seams that the only size and format the .getSnapshot() method is able to return is a 240x320 pixel jpeg. I...

How to convert 32-bit RGBA Image to Grayscale preserving alpha

I'd like to, in code and on demand, convert a 32-bit RGBA Image object (originally a 32-bit PNG) to its 32-bit grayscale counterpart. I've already read several other questions here, as well as many articles online. I've tried using ColorMatrix to do it, but it doesn't seem to handle the alpha very well. Pixels that are entirely opaque...

toggling div as well as "expand/collapse" text and image with jquery

Hi - I have a simple piece of jquery i am using to toggle the visibility of a div (below). What I'd like to add is some text and a little plus sign image that changes to different text and a minus sign image after the div is expanded. Here is my code: jQuery $(document).ready(function(){ $(".toggle").click(function(){ $(".hidden...

automate finding all images used by webpage

When I load a page with Firebug I can see a list of all the images required by the site. How can I automate finding a list of the image URLs used by a webpage, including those referenced in external CSS? ...

Load Images in WPF application

I am not familiar with WPF, and I just feel quite confusing. I am trying to create a little computer game, and there are elements I want to display dynamically. I use Image class and add the images to a canvas. But I'm not sure whether it's a good practice. I feel that adding controls to canvas seem to be a little wired. And I'm a littl...

wpf: How to keep an image stay in its original size?

hi, guys! i have a problem about the image display in wpf. here's my code <Button HorizontalAlignment="Left" Grid.Column="1" Grid.Row="5" Margin="0,5"> <Button.Content> <StackPanel Orientation="Horizontal" Margin="10,0"> <Image Source="/images/user_add.png" Stretch="None" HorizontalAlignment="Center" ...

How do I create a preloading cache page?

What I'm after is creating a page that has a preloading bar (similar to a flash one) that loads the cache of the website before redirecting to them to the home page with the entire website loaded, so it runs smoothly! ...

Oracle Blob as img src in PHP page

I have a site that currently uses images on a file server. The images appear on a page where the user can drag and drop each as is needed. This is done with jQuery and the images are enclosed in a list. Each image is pretty standard: <img src='//network_path/image.png' height='80px'> Now however I need to reference images stored as a ...

Pros and cons of keeping metadata in image thumbnails

I am working on optimizing site load speed for a few moderately high traffic sites. Some quick observations show that creating 40 picture thumbnails (e.g. 138x138 JPG @75% quality) results in 700 Kb total size with embedded metadata and 258 Kb with stripped metadata. Which means that roughly 60% of image size is metadata. So what would ...

In .NET, How can I draw shapes on a picture ?

I'm doing a software where I need to put squary bordering fields on a satelite map (.png image), so that the fields can be clicked. What is the best way to add shapes on a picture and associate them with data ? ...

Why Internet Explorer can not display an image on the site?

I have a site that is managed with Joomla. I want to display an image in one of my articles but that image can not be viewed in Internet Explorer but other browsers can display it, although the path is ok. I miss something? Link: http://ascorbrasov.ro/images/stories/necula_ctin2.jpg Html: <img src="/images/stories/constantin_necul...

Build turns partially transparent image pixels black

I'm very new to C# and I've run into a problem and haven't been able to solve it. I have a row of buttons that have .png images assigned to them. The images are in .png format to allow transparency, and smoothing the edges in GIMP leaves some semi-transparent pixels. I've set the Image List Toolbar (imglToolbar)'s properties to recogn...

swf to image on the website??

hi, i want to convert a swf to image on my website. a user makes some changes on the stage and if he press a button "get image link", the swf stage will be converted to an image and its image link will appear within a box. like imageshack.. so user can use it in forums as image. how can i do this? i even dont know it is about flash or ht...