Skip to content

Instantly share code, notes, and snippets.

@rbobillot
Last active August 29, 2015 14:24
Show Gist options
  • Save rbobillot/b53f72188f98b58e4c41 to your computer and use it in GitHub Desktop.
Save rbobillot/b53f72188f98b58e4c41 to your computer and use it in GitHub Desktop.
import java.net.URL
import java.io.File
import javax.imageio.ImageIO
//lazy val file = new File( "/tmp/testing" )
lazy val file = new URL( "http://goo.gl/vOYtrv" )
lazy val img = ImageIO.read( file )
lazy val width = img.getWidth
lazy val height = img.getHeight
println( "width : " + width )
println( "height: " + height )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment