Updated Image Processing Los Angeles CA

Working on a website in the middle of the night as I usually do is always an interesting and lonely experience. The benefit is that you get a lot done because no one bothers you. The downside is that waking up the next day is never fun.

Local Companies

Haninmart
(213) 388-8100
3807 Wilshire Blvd
West Hollywood, CA
Law Promo
213-341-1673
3278 Wilshire Blvd
Los Angeles, CA
Los Angeles Web Design Company
800-526-8045
300 N. Los Angeles St.
Los Angeles, CA
JN Media
(323) 666-1751
6565 Sunset Blvd.
West Hollywood, CA
Dna Group Inc.
(323) 465-6499
1617 Cosmo St
West Hollywood, CA
Lilya's Design
(323) 960-2502
6381 Hollywood Blvd
West Hollywood, CA
WebDesigns-Studio.com
909-510-2002
291 S. LA CIENEGA BLVD SUITE 311
BEVERLY HILLS, CA
Koves Technologies, LLC
866-241-7884
8350 Wilshire Blvd.
Beverly Hills, CA
Themis Web Technologies
(323) 944-0790
6399 Wilshire Blvd
West Hollywood, CA
Xts global
323 545 6767
8075 West Third Street Suite 303
Los Angeles, CA

Working on a website in the middle of the night as I usually do is always an interesting and lonely experience. The benefit is that you get a lot done because no one bothers you. The downside is that waking up the next day is never fun.

This evening I managed to image processing code for our site. Every image - hundreds of thousands of them are passed through that code. It is fun to watch on the server because you can see the images being generated and then cached on the fly. Hundreds of them are generated every second. Pretty cool eh?

The uncool part was that it has had a few problems this last week. We recently received some images from our designers that were in a new format. (Who would have thought that there are so many formats for gif and jpg). At any rate the image processor was choking on some of some of the unsupported formats, throwing an exception, and then spewing out the 'Image Not Found' thumbnail that it likes to spit out when it gets lost.

This of course drove everyone in the office crazy because, well the image was there but the computer was telling then it wasn't.

Its fixed now.

In case you wonder what made the difference here it is:

This was the exception:
A Graphics object cannot be created from an image that has an indexed pixel format.

Here's the documentation from Microsoft

and here is the code I used to deal with the issue:

private Bitmap GetTempImage(int width, int height)
{
Bitmap tempImage;
if(_CurrentImage.PixelFormat == PixelFormat.Undefined ||
_CurrentImage.PixelFormat == PixelFormat.DontCare ||
_CurrentImage.PixelFormat == PixelFormat.Format1bppIndexed ||
_CurrentImage.PixelFormat == PixelFormat.Format4bppIndexed ||
_CurrentImage.PixelFormat == PixelFormat.Format8bppIndexed ||
_CurrentImage.PixelFormat == PixelFormat.Format16bppGrayScale ||
_CurrentImage.PixelFormat == PixelFormat.Format16bppArgb1555)
{
// None of the above types are support so
//just create a bitmap that uses the default pixel format
tempImage = new Bitmap(width, height);
}
else
{
tempImage = new Bitmap(width, height, _CurrentImage.PixelFormat);
}
return tempImage;
}

For more information, go to www.theplancollection.com.

Featured Local Company

Haninmart

(213) 388-8100
3807 Wilshire Blvd
West Hollywood, CA

Related Local Events
Information Week 500
Dates: 9/13/2009 - 9/15/2009
Location: St. Regis Monarch Beach Resort
Dana Point, CA
View Details

IS Audit and Control - ISACA International Conference
Dates: 7/19/2009 - 7/22/2009
Location: Los Angeles Century Plaza Hyatt Regency
Los Angeles, CA
View Details

CA Boom Design Show - June 2009
Dates: 6/26/2009 - 6/28/2009
Location: Former Robinsons Flagship Department Store
Beverly Hills, CA
View Details

Dwell On Design 2009
Dates: 6/26/2009 - 6/28/2009
Location: Los Angeles Convention Center
Los Angeles, CA
View Details