All I really need is the grid of colors that make up an image.
I wasn't sure how to access that (made especially hard since I wasn't sure how it was referred to) - but then I remembered the ThousandWords module - it looks at each pixel and then looks at the color for that pixel, and then puts a character down that is colored that same color.
Looking through that code, it uses GD and image->getPixel which is accessed via iterating the pixels (you can get the size of the image from other calls and then use that to know how to iterate) - and then off of the getPixel call, you can get the rgb for that pixel.
That will be enough for me to get the color data from and then run the analys from there.
I have a few thousand pictures now to program this for - hopefully I can get this banged out in the next few days.
-------------------------------------------------------------------
There are some odd things afoot now, in the Villa Straylight.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.