hi all,
i wanna generate thumbnail from image
i found RMagick and found this code but i can’t run it, so please anyone
help me in this issue.
my code
def index
img = Magick::Image.read(’/images/img2.jpg’).first
width, height = 100, 100
thumb = img.resize(width, height)
thumb.write(’/images/mythumbnail.jpg’)
end
but it throws this exception
unable to open image `/images/img2.jpg’: No such file or directory
thanks
–
Mohamed S.
software engineer