image

Scale image to completely fill bounding box

For instance, if I need to fill a bounding box that is 100px wide by 50px tall, the following input images would have the following behavior: 200w x 200h gets scaled down 50% and 25% gets chopped off the top and bottom. 200w x 100h gets scaled down 50% with no cropping. 100w x 200h gets is not scaled, but 75px get chopped off top and b...

Remove transparency in images with C#

Hello there, does anyone know a smooth / fast way of removing transparency from e.g. pngs/tiffs etc and replacing it with a white background? Basically what I need this for is I need to create PDF/A compatible images, which may, according to the spec, have -no- transparency (and therefore a fixed white background is fine). Any ideas /...

How to insert an image into some html through JQuery?

Howdy Guys, Here is the situation. I've got a standard link like so: <h2><a href="#">Link Title</a></h2> Now, I want to insert a background to make it look like a button, so I add a span with JQuery like so: $(document).ready(function() { $(".post a").wrapInner("<span></span>"); }); (The html for the link can be found here, ...

Using Visual Studio Image Library PNGs in a Windows Form app

My question is about the Visual Studio Image Library that comes with VS2008. In the _Common Elements\Annotations folder, there are PNGs with multiple sizes and I was wondering what the intended use of these is. Is there an standard way to implement these images, e.g. in a Windows Forms status bar? Here are three of the PNGs as an exam...

Free icons and images to use in my projects

This is not a programming related question, but I think that it might be useful for a lot of people here. Where can I find some quality free icons and images to use in my projects? (usually my apps are freeware or opensource) I mean icons to the toolbars and things like that. ...

Java: Using Castor XML with images

Hey, how can I use Castor XML to marshal a java.awt.Image object to XML, or make the XML reference the image in some way. Cheers, Pete ...

Download and upload images with ASP.net

Hello everyone. In my web application, I need to be able to allow users to upload and download their images. How can this be don in ASP.net? I want to user to be able to sign in (I already have that done) and be able to upload images to their account. Later on, I want them to be able to download them. Thanks ...

How to get image size (height & width) using javascript?

Is there any javascript or jquery apis or methods to get the dimensions of an image on the page? ...

.NET TIFF file: RGB to CMYK conversion possible without a third party library?

Following up my previous question: if and how would it be possible to take RGB based TIFF files and convert them over to CMYK with standard .NET (3.5) functionality? Is that possible at all? ...

Associating an image with a post in WordPress

Hi, What's the best way to associate an image with a post in WordPress? What I mean by that is when each post has a 'header' image which is not in the body of the post. You'd most likely use it to show a small image next to each post when they're listed somewhere. I know you can use custom fields with posts, but are there any better w...

drawImage() for .png files doesn't work in Java applet?

I made this pacman game using an applet. When the applet finishes loading, it is meant to display a 'start menu' graphic i made which says 'Double click to start the game', etc. The graphic would take up the whole 400x400 applet. Here's the code: public void paint(Graphics g) { if (! isRunning) { switch (result) { case 0: s...

UIView - draw Images - tile based game

Hello, i am trying to create a simple puzzle game.. and i have an int[8][8] array that reprents the map.. each cell has a value which represents some item. now i want to draw this map on the screen, i have an image file for each item. (each item has the same width and height) i tried to do this with creating a UIImageView for each cel...

"Parameter not valid" exception loading System.Drawing.Image

Hi i am getting the same exception "Parameter not valid" in my code MemoryStream ms = new MemoryStream(byteArrayIn); System.Drawing.Image returnImage = System.Drawing.Image.FromStream(ms); Actually the byteArrayIn 's length is 169014. And none of value in it is not greater than 255. But i am getting this exception. So my question is ...

Converting XCF and other files using command line with GIMP?

If I have an XCF file (or any other supported by Gimp) how can I convert it to, for example, PNG for display or further processing? ...

.aspx page Response.BinaryWrite image on IE7

I maintain an application that has a .aspx page that loads on image from the database and uses Response.BinaryWrite() to write it back to the client. This worked perfectly not long ago. Two things have changed, we upgraded the application to .NET 3.5 and they upgraded all the computers at work to IE7. Everything works fine on Firefox...

Create and store images on the fly

How would I go about catching a request for images that doesn't exist and create them as needed so as not to return a 404? These would then be stored on the server until no longer needed and deleted. The code would preferably be in PHP. Deletion will most likely occur in a cron job. The images would be requested in batches of 10 or so a...

How can I display my logo on my DokuWiki's title?

I have a DokuWiki and I'd like to place a logo on the title bar at the top of the page? How can I do this? Note that I am not referring to the title bar at the top of the browser, but rather the title bar on the website itself. I tried inserting the DokuWiki syntax: {{public:logo.jpg?100x100}}, but this simply rendered as plain text and...

IE6 Red Cross and Border around image

MAJOR UPDATE: I have a PNG fix working on the site. When I remove the PNG fix the red cross and border disapear. What's odd is that the problem only seems to do it with this particular image. There are other Alpha Blended PNG's on the same page that render fine. The image is not broken (you can see it) nor is it a link. But IE6 and 7 ...

How to make one color transparent on a UIImage?

On my iPhone app I have a UIImage instance. I want to get a derived a UIImage that is the result of the first UIImage where one of its colors (e.g. magenta) is made transparent. How can I do this? ...

site 5x faster via mod_rewrite, but CSS images are broken

I am using .htaccess to accelerate a site with the following redirects: request for http://example.com/images/name.jpg routed to http://i.example.com/name.jpg request for http://example.com/css/name.css routed to http://c.example.com/name.css From listening to the Stack Overflow podcast, I learned that this could make a site fa...