Forum Discussion

dablackgoku1234's avatar
dablackgoku1234
Occasional Contributor
8 years ago
Solved

Check Image size

I have a HTTP request step that checks the link of an image.  I am wondering if there is a way to check the resolution of the image based on that response?
  • KarelHusa's avatar
    8 years ago

    You can check with a Groovy script test step:

     

    import javax.imageio.*
    
    def image = ImageIO.read('http://YourImageURL'.toURL())
    log.info "Width:"+ image.getWidth()+ " Height:" + image.getHeight()
    
    

    Karel