swdyh / quilt

A Ruby library for generating identicon
MIT License
54 stars 8 forks source link

:scale and :size don't create comparable file sizes #1

Closed todd-a-jacobs closed 13 years ago

todd-a-jacobs commented 13 years ago

The :size and :scale parameters create image files of the same dimensions, but the size of the files on disk are wildly different.

identicon = Quilt::Identicon.new 'foo', :scale => 34.14  # creates 512x512 image @12.9KB
identicon = Quilt::Identicon.new 'foo', :size  => 512    # creates 512x512 image @96.5KB

The :size option is creating files almost an order of magnitude larger, when the expected behavior is that both images will be almost identical in file size as well as content.

swdyh commented 13 years ago

The image was resized when there was an size option. It was unnecessary. I corrected it, and update gem. Thank you.