# Attachment\_fu thumbnail quality with image science

**URL:** <https://www.ruby-forum.com/t/attachment-fu-thumbnail-quality-with-image-science/108658>\
**Category:** Rails\
**Created:** [July 5, 2007, 6:54pm UTC](https://www.ruby-forum.com/t/attachment-fu-thumbnail-quality-with-image-science/108658 "2007-07-05T18:54:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [July 5, 2007, 6:54pm UTC](https://www.ruby-forum.com/t/attachment-fu-thumbnail-quality-with-image-science/108658/1 "2007-07-05T18:54:49Z")

</div>

I’m having trouble with the image quality of the thumbnails  
attachment\_fu is creating in my app and I’m hoping someone can point  
me in the direction of a fix.

In my search for answers I’ve found this page [1] which claims  
“ImageMagick’s default resampling filter used for image resizing is  
the Lanczos filter. For Image Science it’s bilinear filter. Bilinear  
is faster but it’s not the best for creating thumbnails of  
photographic images. It’s only possible to set Lanczos as the default  
by patching FreeImage source. It’s pretty straightforward though …”

However there is no detail on how to patch free image. In any case  
another page [2] claims image science has since been updated and that  
it now uses the “Catmull-Rom spline filter for better quality”. Yet,  
the thumbnails still look poor to me.

I’m using version 1.1.3 of image\_science and, as far as I can tell,  
the latest version of attachment\_fu. If anyone does know of a fix or  
has any info on this it would be much appreciated.

Cheers,  
Paul.

> **[paulsturgess.co.uk](https://paulsturgess.co.uk/)**
>
> Paul Sturgess – Full stack software engineer and tech lead.

[1]  
[http://mephistoblog.com/2007/1/9/new-asset-thumbnailing-options-available](http://mephistoblog.com/2007/1/9/new-asset-thumbnailing-options-available)  
[2] [http://blog.caboo.se/articles/2007/3/8/image-science-updated](http://blog.caboo.se/articles/2007/3/8/image-science-updated)

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [July 19, 2007, 10:50pm UTC](https://www.ruby-forum.com/t/attachment-fu-thumbnail-quality-with-image-science/108658/2 "2007-07-19T22:50:56Z")

</div>

I managed to find a fix for the problem…

In the model I had ‘resize’ and ‘thumbnails’ options set. I removed  
the ‘resize’ option and added it as an additional size in the  
‘thumbnails’  
option instead and now the quality is good.

Hope that saves someone the time I spent trying to solve it!

Cheers,  
Paul

> **[paulsturgess.co.uk](https://paulsturgess.co.uk)**
>
> Paul Sturgess – Full stack software engineer and tech lead.
