Re: jpeg image decompiling
- From: Norman Peelman <npeelman@xxxxxxxxxx>
- Date: Thu, 30 Aug 2007 23:01:41 -0400
William Gill wrote:
I have found a couple of sites that allow a visitor to upload an image and the site returns either the "average color", or a palette of colors. Several of them use PHP to accomplish this. I have requested the source code, but have not gotten a response (even though one site states "source code available on request"). It is obvious that they read the colors of each pixel and them manipulate that data. I would like to be able to do something similar.
I'm not very familiar with the PHP image functions, but have been able to figure out how to read pixel color on indexed color images, but not on jpegs. The best I can do now is convert a jpeg to a 256 indexed color image, and then read pixel color. Unfortunately too much of the original data gets lost.
Does anyone know how to determine the color of jpeg pixels, or can you point me to a good tutorial on PHP image functions.
For what it's worth, one of the things I want to do is determine the distribution of each color (i.e. 345 pixels of rgb1, 2436 pixels of rgb2, etc.), and possibly manipulate the image by removing and/or replacing any given color.
You really don't 'need' PHP for this... take a look at imagemagick at
http://www.imagemagick.org
and
http://www.imagemagick.org/Usage/compare/#metrics
Norm
.
- References:
- jpeg image decompiling
- From: William Gill
- jpeg image decompiling
- Prev by Date: Re: [OT] Re: PHP and .NET
- Next by Date: Re: Uploading problem
- Previous by thread: Re: jpeg image decompiling
- Next by thread: isql works, odbc doesnt
- Index(es):
Relevant Pages
|