"Richard Lynch" <ceo@xxxxxxxxx> wrote in message news:2884.66.99.91.45.1106087380.squirrel@xxxxxxxxxxxxxxxx > Rob Adams wrote: >> "Jason Barnett" <jason.barnett@xxxxxxxxxxxxx> wrote in message >> news:20050118191142.432.qmail@xxxxxxxxxxxxxxxx >>> Rob Adams wrote: >>>> Ok - Let me restate some of this: >>>> >>>> I am creating these images in PHP. I have a script right now that >>>> accepts two images. A main one, and the one that will be hidden. >>>> These >>>> can be either jpg, gif, or png. It then outputs a png image like this: >>>> >>>> http://imagineinc.net/images/ >>> >>> By main / hidden images, do you mean blending images together? Because >>> what I saw from visiting this link was a background scenery with a >>> flower >>> etc. with red, green and blue ovals on top of it. (Firefox 1.0) >> >> I'm curious about Firefox. Did you try highlighting the image in it? If >> I >> remember correctly, Firefox's highlight grid is the reverse of Internet >> Explorers, which is what these images were made for, though I have a flag >> in >> my code to reverse my grid too. I just tried loading this in Firefox, >> and >> it definately doesn't have the same effect as in IE. Try it in IE, then >> highlight the image. >> >> Perhaps my example is so poor, noone here is understanding what I'm >> trying >> to do. Checkout this link: >> http://www.toccionline.com/creations/ctrla/ >> >> That is what I'm trying to do, only with whatever two images you happen >> to >> want to do it with, on the fly, in PHP. > > I'm assuming you've read this: > http://www.toccionline.com/creations/ctrla/how.html > > The only part of that which is pretty much non-trivial would be the part > at the end about playing with the "output levels" and maybe > "brightness/contrast" until it "looks right" > > You could spend the next 50 years in AI research with specializations in > visualization trying to find the perfect algorithm for that, and still > fail -- Which is about where the state of the art in AI research with > specializations in visualization is today :-) > [Apologies for this "dig" at my colleagues] > > You might, however, want to do some light reading in that arena to see if > there are some simple heuristics you can "steal" to know what to do to the > image you are trying to hide. > > I believe that for Firefox/Mozilla, you simply need to switch the grid > around and color-code the "other" pixels the same way, so that should be > do-able. > > Bottom line, though, is that even though you are doing this in PHP, you're > basically asking a Visualization Expert question... Might as well ask us > about brain surgery, when you get right down to it. Somebody here *might* > know the answer... Sorry. > > Some general principles that seem to be implied from my reading of that > page: > > The primary (un-hidden) image should be "busy" and not have large chunks > of all-the-same color. That makes me think JPEG might be the better > output format, though perhaps JPEG would actually muck up all the pixels > you're trying to hide in the first place... > > The "hidden" image should be less busy, with larger chunks of the same > color, I suspect. > > Alpha-blending the hidden image down to 50% may well prove to be a cheat > to get the desired goal for a general image. > > I don't think you're EVERY going to get satisfactory results for two > randomly-selected arbitrary images. If the "hidden" image is too busy, > and the "visible" image is too not-busy, you're going to end up with the > hidden image pushing through too much. > > NOTE: The entire second half of this post was all guess-work. YMMV. These are actually all very good points. I wasn't expecting someone to be a brain surgeon... but perhaps hoping? :) Also, this has really been just something I've done for fun and learning, and I've learned a lot. Tons from what you just wrote too. I think you finally understood where I am at in this project. I know it's unrealistic to make this work with any two arbitrary images, but it would be interesting to just make it work well with any two 'good' images. Asking around, I've found an algorithm to reduce the contrast of the hidden image, and dither the main image. This seems like the best option right now, and I'm excited to see how it turns out. I'll post some code and results later tonight. Thanks alot for the insights and information. I was hoping that what you said about Firefox was true (the only other browser I have right now), but I'm no longer sure that's the case. I've tried viewing some of these images in Firefox, and both the main and the hidden image can still be seen when highlighted. So I'll have to figure out what it's doing to the picture too. -- Rob (I wouldn't mind doing your suggestion about PhotoShop, but I don't even own it. The only program I ever use for editing images is Paint!) :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php