|
Phaėton
|
 |
« on: January 06, 2010, 03:29:45 PM » |
|
I was wondering if the cache could help me brainstorm a few different ways to approach this problem. The platform is LAMP/Wordpress and the mission is to overlay text on an image. The text will change based upon A number of 'foobars' in a database/table. I thought maybe just use java to draw on the screen where the image was. Another thought was an actionscript that drew on the image with data from a flat file that was updated by a trigger in the database (when the insert of a new foobar record happens, change the number in the file.
Any thoughts?
|
|
|
|
|
Logged
|
When I was your age we used to walk to the TV to change the channel.... _̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡
|
|
|
|
rcjordan
|
 |
« Reply #1 on: January 06, 2010, 03:51:21 PM » |
|
I've used php's GD image manipulation library to write text into jpegs on-the-fly. Some code to play with here: http://bokehman.com/watermark
|
|
|
|
|
Logged
|
|
|
|
|
perkiset
|
 |
« Reply #2 on: January 06, 2010, 04:02:05 PM » |
|
Javascript and CSS can do an admirable and fine job at the client. Java at the client will work as well, however you bring in a bunch more complexity. If you have control over the browser, use the latest FF or Safari and write directly with the CANVAS interface. At serverside, I do this all the time (construct new images on the fly). Install the GD library (after you've installed the JPEG and perhaps PNG library) on any LAMP box, recompile PHP with the GD switch turned on, and you're good to go. Here's an example: chalkboard base with an Adobe chalkboard font, drawn from entries in a database of today's specials at one of our client's restaurants: http://www.giuseppeson28th.com/giuseppes-menu.htmlIt's not one big image - I construct strips with the appropriate writing, then use CSS to line it all up to look like one big chalkboard, but you get the idea. Here is the pertinent code from the middle of the routine that builds a strip, as well as the HTML to call it. You could also simply build the images when they are called for, but you'd be doing a lot more processing. This builds the images and HTML necessary for calling them. This particular routine works once per day (or if there is a change to the menu) so that I don't overwork the server: $im = imagecreatefromjpeg('../graphics/cbMenuTemplateSmall.jpg'); $white = imagecolorallocate($im, 245, 245, 245); imagealphablending ($im, true); imagettftext($im, 9, 0, 65, 10, $white, $fontLoc, $line); imagepng($im, "{$destPNG}/menu_{$i}s{$s}.png", 9); imagedestroy($im); $descrip = str_replace(array(chr(10), chr(13)), '', $db->row['description']); $outArr[] = " <img src=\"/graphics/menu_{$i}s{$s}.png\" class=\"cbDetail\" alt=\"$descrip\"><br>";
|
|
|
|
|
Logged
|
It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
|
|
|
|
Phaėton
|
 |
« Reply #3 on: January 11, 2010, 10:40:37 AM » |
|
Nice CHALKBOARD... i wanna eat there now too..  Thanks for this tip it works GREAT!!
|
|
|
|
|
Logged
|
When I was your age we used to walk to the TV to change the channel.... _̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡
|
|
|
|
Phaėton
|
 |
« Reply #4 on: January 31, 2010, 02:47:07 PM » |
|
Ive been thinking, how secure would this be for just pasting some text over a fuzzy image as a ghetto captcha?
|
|
|
|
|
Logged
|
When I was your age we used to walk to the TV to change the channel.... _̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡
|
|
|
|
perkiset
|
 |
« Reply #5 on: February 01, 2010, 07:59:38 PM » |
|
Well, I think it'd be easier to scrape you.
The deal is that the lines and squiggles in the CAPTCHA distract a turtle-type image interpreter. If you only have the letters, regardless of fuzz, then interpretation will be easier.
|
|
|
|
|
Logged
|
It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
|
|
|
|
perkiset
|
 |
« Reply #6 on: February 11, 2010, 05:40:46 PM » |
|
See now, this is about 8 of Neeraj the 'bot's posts and they are surprisingly on target. Without the URL in the sig, they're useless, but either this is a mofo of a context engine+autopost or a helluva lot of manual work.
|
|
|
|
|
Logged
|
It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
|
|
|
|
vsloathe
|
 |
« Reply #7 on: February 12, 2010, 11:54:43 AM » |
|
Sorry I've scrapped a few of them. We should probably examine em.
It's old hat though. If I were a betting man, here is what he's doing:
1) create a bunch of forum accounts on various fora and post semi-related information that seems innocuous or like maybe you don't speak English very well
2) let them drop way down and gain authority, hopefully the mods will forget about you
3) edit your forum sig and drop links into it
this way, we would never notice his forum sig links being added since the posts are old. He wouldn't make any further posts, so chances are he'd never really get noticed. It's worked well for a couple of years now and is really the only way to productively use XRumer, imo.
|
|
|
|
|
Logged
|
hai
|
|
|
|
perkiset
|
 |
« Reply #8 on: February 12, 2010, 11:58:23 AM » |
|
Totally get that game (jeez, wonder why?  ) - and since he's not responded yet, he'll prolly get a permanent lockdown shortly, protecting the sig-link game.
|
|
|
|
|
Logged
|
It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
|
|
|
|
perkiset
|
 |
« Reply #9 on: February 12, 2010, 11:58:37 AM » |
|
BTW, nice to see you about, old friend 
|
|
|
|
|
Logged
|
It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
|
|
|
|
vsloathe
|
 |
« Reply #10 on: February 16, 2010, 11:57:19 AM » |
|
BTW, nice to see you about, old friend  Thanks  Sort of busy lately but I'm popping by as I can.
|
|
|
|
|
Logged
|
hai
|
|
|
|
perkiset
|
 |
« Reply #11 on: February 16, 2010, 12:08:42 PM » |
|
I think we'll have some interesting things to discuss in the near future. Nuts and I are working on some grand plans.
$hope = ($busy == $cash);
|
|
|
|
|
Logged
|
It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
|
|
|
|
nutballs
|
 |
« Reply #12 on: February 16, 2010, 12:25:25 PM » |
|
Grand... Fucking moon landing with 64k of memory. LOL
|
|
|
|
|
Logged
|
I could eat a bowl of Alphabet Soup and shit a better argument than that.
|
|
|
|
perkiset
|
 |
« Reply #13 on: February 16, 2010, 12:35:55 PM » |
|
Well yeah, but 16 really good looking 4K chips.
|
|
|
|
|
Logged
|
It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
|
|
|
|
vsloathe
|
 |
« Reply #14 on: February 17, 2010, 12:41:03 PM » |
|
I don't know if there's ever been a point in my life at which I've been so busy and made so little money from it. I need a better agent.
|
|
|
|
|
Logged
|
hai
|
|
|
|