THAT IS EXCELLENT!!!!!!!!!!!!!!!!!!!!!!!!
thanks for assisting with searching around - I will post and share once
I get moving further along - Actually - I am sure to need some
assistance from the list here and there - but thanks for the huge lift
at the start!

Thanks again!
Jay Miller

Jon Hall wrote:


Well here is something for a start, I did a little looking around for
you, and it need not be as complex as fiddling around with bitmaps.
ImageMagick has a nifty feature that allows you to convert an image to
text. A JPEG comes out looking like this:

0,0: 65535,65535,65535  #FFFFFF
1,0: 65535,65535,65535  grey100
2,0: 65535,65535,65535  grey100
3,0: 65535,65535,65535  grey100
4,0: 65535,65535,65535  grey100
5,0: 65535,65535,65535  grey100
<snip/>
39,0: 65535,65535,65535  grey100
40,0: 64507,65535,64250  #FBFFFA
41,0: 63479,65278,63479  #F7FEF7
42,0: 65278,65535,65021  #FEFFFD
43,0: 65535,65021,65021  #FFFDFD
44,0: 65535,65278,65021  #FFFEFD

The first column is the x,y pixel coordinate and the right one is the
color, and I have no clue what the 3 numbers in the middle are :)

>From this point though, it's a straight-forward task to count the
numbers of distinct colors in the file. I

'd bet there is a UDF at
cflib.org that will even do the counting. You also might want
imagemagick to do some color reduction before converting it to text
would speed it up, and reduce the amount of colors the Flash front end
has to deal with...

ImageMagick can be run using cfexecute or it's COM object via
cfobject (it's COM interface is very simple, it might even work in
MX), and it's free!

http://www.imagemagick.org <http://www.imagemagick.org> 

jon
Saturday, August 24, 2002, 3:31:40 PM, you wrote:

JM> Thanks for your posts guys - I think it's funny how some of you got 
JM> "porn" from that - Actually it is on the other end of the spectrum
and 
JM> quite an innocent little program I am researching for myself.

JM> As for getting a hold of a graphics guy - I am. 15 years heavy print
and 
JM> graphic design 3 years coldfusion. So that is why I posted - I hav

e been 
JM> searching and searching - for color specific items like chroma
keying 
JM> and such where you take exact colors and filter them out - I f igure
if 
JM> they can tell you what to remove - they need to read what's there.

JM> As for the major softwares - illustrator, adobe and fireworks having

JM> stuff like this - they really don't that I have seen through the
years.

JM> I understand your suggestion on the bitmap - that's a good idea -
but 
JM> being more of a imaging guy- Not quite sure where to start - haven't

JM> coded things like that yet- Just heavy SQL and database for commerce
sites .

JM> You  have a starting point on that code? Tutorials or samples that
do or 
JM> run close to what you mentioned. At least if I have a starting point
it 
JM> would help!
JM> thanks
JM> jay

JM> Jon Hall wrote:


You really need to get ahold of someone who specializes in imaging
applications (maybe one of the Fireworks guys?)and ask if there is a
library out there that does this already, and then you could integrate
it with CF on the server, which would feed your flash app the values
you need.

The only way I could think of to do this without a helper app, would
be to convert the jpeg into a windows bitmap. Then run through the
bitmap
color by color adding them up, and doing the math at the end. This
certainly wouldn't be the fastest process in the world, but it would
work, and would be relatively easy to code.
Someone with more knowledge of image formats may be able to tell you a
slicker, faster way of doing this though. Hopefully that someone is
lurking here.



JM> 

______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to