how to change photo size from 300k -> 100k?

In ruby how to change photo size from 300k -> 100k?
have any methods?

imagemagic

-quality