J. Pablo Fern?ndez wrote:
> Hello,
> 
> I'm using rmagick but I'm open to other libraries if needed. I want to
> resize an image, scale actually (mantaining the aspect ratio) so that
> the
> size of the file is lower than a certain amount of bytes. Any ideas
> how to
> do this?
> 
> Thanks.
> --
> J. Pablo Fern?ndez <pupeno / pupeno.com> (http://pupeno.com)
> 

I can't speak for other libraries, but this is not possible with 
RMagick. This question comes up from time-to-time on the ImageMagick 
forum but the answer is always "not possible" other than just by 
trial-and-error.

-- 
RMagick: http://rmagick.rubyforge.org/
RMagick 2: http://rmagick.rubyforge.org/rmagick2.html