Re: Scaling icons



On 2003.05.15 23:44 Owen Taylor wrote:

[snip]

What I'm thinking of doing
(image_size = MAX(image_width,image_height):

 - For "fixed" size icons, don't scale

 - For "Scalable" icons, load them at a scale of
   desired_size / dir_size. If dir_size isn't set (the icon
   theme spec requires dir_size, but I bet some KDE themes will
   omit it) load them at a scale of desired_size/image_size.

 - For "Threshold" icons, if desired_size - dir_size > threshold
   load at a scale of desired_size / dir_size, otherwise don't
   scale.

 - For unthemed icons, adopt the nautilus algorithm: scale
   by desired_size / image_size if image_size > MIN_SIZE,
   otherwise don't scale. Probably use the nautilus MIN_SIZE
   value of 53 for lack of anything better.

Does this make sense?

All apart from the last one, yes.

Can you explain the rationale for when scaling is applied in
unthemed icons? Do we know why nautilus does it this way?

My first instinct would be to decide when to scale based on
desired_size / image_size, eg.,:

don't scale iff 1/n < desired_size / image_size < n

where n might be something like 2.

Cheers,

--
Ali Harlow                              Email: ali avrc city ac uk
Research programmer                     Tel:   (020) 7040 4348
Applied Vision Research Centre          Intl: +44 20 7040 4348
City University                         Fax:   (020) 7040 5515
London                                  Intl: +44 20 7040 5515



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]