Could not instantiate SVGImageReader Exception in Scrimage


Scrimage is a powerful image processing scala library . Basically Scrimage’s functionality based on java.awt.* along with others third party library like “metadata-extractor” , “xmlgraphics” etc .

The use case of this library is optimizing the image without loosing the original  image quality . We can apply processing like  resize, rotate, filter, crop, convert between formats on image .

To know more about Scrimage , you can visit on https://github.com/sksamuel/scrimage .

That was about Scrimage but what actually we face during the processing of image “Could not instantiate SVGImageReader” error message on terminal .It does not affect processing of image  but no one would like gaint error message on console like :

scrimageError

Found  root cause :

rootcause

Deep into looking , i found Apache Batik – Common runtime exceptions list . On searching in this list i came across “Fixed by adding batik-codec.jar to class path” .

A qucik glance in maven repository and update build file by adding


libraryDependencies += "org.apache.xmlgraphics" % "batik-codec" % "1.7"

Then the console error disappear . ohh Great !

Hope , this would help someone else who are facing same issues 🙂

About Malti Yadav

An enthusiastic technologist , Scala developer, positive attitude and the desire to go extra mile .
This entry was posted in Scala. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s