Dit weblog bevat nieuws en artikelen over internet, webdesign, online marketing, zoekmachine optimalisatie, usability en andere webonderwerpen.
Bij "Een kijkje in de keuken" probeert Jasper iets leuks te maken. Hij laat hierbij zien wat hij heeft gedaan, wat hij heeft gebruikt, welke problemen hij is tegen gekomen en hoe hij deze heeft opgelost.
<cffunction name="smallImage"> <cfargument name="src" /> <cfargument name="title" /> <cfscript> dest = "#request.site.fs_root#/shared/images/generated"; destImage = "#dest#/small_#arguments.title#"; returnSrc = "#request.site.webroot#/shared/images/generated/small_#arguments.title#"; if( not fileExists(destImage) ) { image = imageRead(arguments.src & arguments.title); imageResize(image,100,65); imageWrite(image,destImage); } </cfscript> <cfreturn returnSrc /> </cffunction> |
<cffunction name="blur" access="remote"> <cfargument name="hradius" default="0" required="No"> <cfargument name="vradius" default="0" required="No"> <cfargument name="sImage" /> <cfscript> dest = "#request.site.fs_root#/shared/images/generated"; destImage = "#dest#/blur_#arguments.sImage#"; loadPaths = [ expandPath( "../java/Filters.jar" ) ]; javaloader = createObject( "component", "javaloader.JavaLoader" ).init( loadPaths ); srcImage = imageGetBufferedImage(imageRead( expandPath( "../images/generated/#arguments.sImage#" ))); obj_blur = javaloader.create( "com.jhlabs.image.BoxBlurFilter" ); obj_blur.setHRadius(javaCast("int",arguments.hradius)); obj_blur.setVRadius(javaCast("int",arguments.vradius)); result = obj_blur.filter(srcImage,srcImage); finalImage = imageNew(result); imageWrite(finalImage,destImage); </cfscript> <cfset rImage = this.glow(0.5,"blur_#arguments.sImage#")> </cffunction> |
function lightUp(img) { Effect.Appear(img, {duration: 0.1, queue: 'step1'}); } function darkenDown(img) { Effect.Fade(img, {duration: 0.1, to: 0.2, queue: 'step1'}); } |
function nextImg() { x = currImg; if( x == nImgs) nNext = 1; else nNext = x + 1; nNext = "img" + nNext; $(nNext).onclick(); } function prevImg() { x = currImg; if( x == 1) nPrev = nImgs; else nPrev = x - 1; nPrev = "img" + nPrev; $(nPrev).onclick(); } |
function swapMain(y, n) { if( currImg != n) { currHeight = y; $('img' + n).onmouseout = function(){}; Effect.Appear('img' + n,{duration:0.1}); y = y + 10; pos = n * 2000; pos = 2000 - pos; $('mainContainer').morph('height:'+y+'px;' , {duration:0.5,transition:Effect.Transitions.EaseFrom}); $('mainContainer').morph('left:'+pos+'px;' , {duration:0.2,transition:Effect.Transitions.EaseTo, queue: 'end'}); Effect.Fade('editedImg' + n, {duration: 0.5, queue: 'end'}); if( slideshow == 0 ) { $('arrowbottom').morph('height:0px;', {duration:0.5}); Effect.Fade('arrowImg2', {duration: 0.5}) $('arrowtop').morph('height:20px;', {duration:0.5}); Effect.Appear('arrowImg', {duration: 0.5, to:0.5}) Effect.Appear('arrowR', {duration: 0.5, to:0.5}) Effect.Appear('arrowL', {duration: 0.5, to:0.5}) } if( currImg != n && currImg != "") { Effect.Appear('editedImg' + currImg, {duration: 0.5, queue: 'end'}); $('img' + currImg).onmouseout = function(){darkenDown(this)}; Effect.Fade('img' + currImg, {to:0.2, duration:0.1, queue: 'end'}); } currImg = n; } } |