swdyh / quilt

A Ruby library for generating identicon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

todd-a-jacobs opened this issue · comments

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.

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