Been a while since I posted a challenge, and today I had a good idea for a new one. Given a source image, divide the picture into 100 squares, and then paste these squares into a new picture in random order. This will create a mixed up version of the source image. You can assume a decent sized image (minimum of 200x200 pixels). Post your solution, and if you can, URLs to some sample output. As one hint, don't forget ColdFusion has the ability to paste images into canvases.
-
Sponsors
-
Subscribe
Enter your email address to subscribe to this blog. -
-
Categories
- Adobe (103)
- Adoption (8)
- AIR (89)
- AJAX (376)
- ASP (4)
- BlogCFC (138)
- Books (22)
- Canvas Wiki (21)
- CFEclipse (24)
- cfObjective (2)
- CFUNITED (11)
- ColdFusion (2499)
- ColdFusion Builder (53)
- Development (213)
- Flash (19)
- Flex (147)
- Framework One (2)
- Fusebox (5)
- Galleon Forums (52)
- Groovy (1)
- Hardware (11)
- Harlan Ad Server (7)
- Java (10)
- JavaScript (44)
- jQuery (124)
- Lighthouse Pro CF Bugtracker (42)
- Lost (39)
- MAX (98)
- Misc (537)
- Model-Glue (94)
- Movies (22)
- Music (10)
- ORM (1)
- Politics (18)
- QuickPoll CFC (2)
- Soundings Survey (24)
- SpoolMail CF Mail Reader (8)
- Starfish CF Profiler (4)
- Television (24)
- Transfer (15)
- Video Games (51)


Comment 1 written by todd sharp on 7 August 2009, at 8:12 AM
Comment 2 written by Mike Hodgson on 7 August 2009, at 8:54 AM
http://209.200.68.149/imagetest.cfm
Yes, I'm using the free CF9 hosting graciously provided by CrystalTech :)
Will link to the code from the same page, once I get it cleaned up a bit :)
Comment 3 written by Kumar on 7 August 2009, at 9:12 AM
http://209.200.68.148/image.cfm
Code:
<cfimage name="imgGlobe" source="globe.jpg">
<cfimage source="#imgGlobe#" action="writeToBrowser" >
<!--- Destination Image --->
<cfset imgC = ImageNew("",400,400,"argb")>
<cfset imgA = imgGlobe>
<!--- Loops will create our 100 squares --->
<cfloop from="0" to="360" step="40" index="x">
<cfloop from="0" to="360" step="40" index="y">
<cfset imgA = imgGlobe>
<!--- Get the Image Area square --->
<cfset imgB = ImageCopy(imgA,x,y,40,40,x,y)>
<!--- Paste the image to our destination --->
<cfset ImagePaste(imgC,imgB,y,x)>
</cfloop>
</cfloop>
<cfimage source="#imgC#" action="writeToBrowser">
Comment 4 written by Raymond Camden on 7 August 2009, at 9:24 AM
Comment 5 written by todd sharp on 7 August 2009, at 9:27 AM
Comment 6 written by Kumar on 7 August 2009, at 9:48 AM
Comment 7 written by Steve Caldwell on 7 August 2009, at 9:56 AM
http://www.bennadel.com/resources/demo/jquery_puzz...
I created one with my own image, just don't have public facing CF space.
Comment 8 written by todd sharp on 7 August 2009, at 10:09 AM
Comment 9 written by Rob O'Brien on 7 August 2009, at 11:17 AM
Comment 10 written by Matthew Abbott on 7 August 2009, at 11:41 AM
http://www.coldfusionjedi.com/demos/maimage/
Thanks Ray for graciously hosting this.
Comment 11 written by todd sharp on 7 August 2009, at 11:44 AM
Comment 12 written by todd sharp on 7 August 2009, at 11:46 AM
I'd also love to see a blog post written up on how you did it (I know I can view the source, but I'd still like to see a write up).
Comment 13 written by todd sharp on 7 August 2009, at 11:47 AM
$("#sortable").sortable();
That's it?!
Comment 14 written by Raymond Camden on 7 August 2009, at 11:50 AM
yes, the jquery ui library kicks ass.
Comment 15 written by Matthew Abbott on 7 August 2009, at 12:10 PM
Comment 16 written by Cody on 7 August 2009, at 12:35 PM
I tried it with HTML 5 and JavaScript/jQuery.
http://www.codymarquart.com/projects/image100/
Comment 17 written by Raymond Camden on 7 August 2009, at 12:37 PM
Comment 18 written by todd sharp on 7 August 2009, at 12:49 PM
Comment 19 written by Jason Walle on 7 August 2009, at 1:01 PM
http://code.project924.com/img-functions/cut-and-r...
Comment 20 written by Leigh on 7 August 2009, at 1:27 PM
You have got to be joking .. a one liner? Damn. That _is_ awesome. Hats off to @Mathew.
@Mike,
(Despite the Horrible Hasselhoff cover ;-) Great work!
Comment 21 written by Chris Ulrich on 8 August 2009, at 9:03 AM
Here's my attempt .. makes me feel old school !
http://www.drg1.com/challenge.cfm
Comment 22 written by Raymond Camden on 8 August 2009, at 9:07 AM
Comment 23 written by Bjarte on 13 August 2009, at 12:57 PM
http://bjarte.dev.inbusiness.no/canvas/index.html
Comment 24 written by Raymond Camden on 13 August 2009, at 2:36 PM
[Add Comment] [Subscribe to Comments]