Hi 

It seems we got to a nice setup that resulted in enhancing the thumbnails 
display in our DSpace.

1) Under dspace/config/dspace.cgf set the size of the image to be created:

thumbnail.maxwidth = 800
thumbnail.maxheight = 600

Note: Performance seems not to be an issue at this moment although the image 
size increased from 2kb to around 70kb.

2) In our theme I've changed the following line to add a CSS class to the 
thumbnail  images:

From:
<img alt="Thumbnail">
To:
<img class="thumbnail" alt="Thumbnail">

3) And later I've added the .thumbnail definition to the CSS:

.thumbnail
{ 
        max-width: 110px;
        max-height: 110px;
}

Note: This way the larger resolution bigger image makes the thumbnail to look 
better.

3) I've used the command dspace filter-media -f -n -i <item handle> to force 
DSpace to recreate the thumbnail and it worked for most of the files I tried.

Thanks for your support on this.

Best regards

Rodrigo Calloni
System Librarian
Felipe Herrera Library
Knowledge and Learning Sector
Tel: 202-623-2952
Fax: 202-623-3183

1300 New York Avenue, N.W.
Washington, D.C. 20577
USA
www.iadb.org

"Knowledge for Development Challenges"
  Please consider the environment before printing this email

-----Original Message-----
From: ivan.ma...@gmail.com [mailto:ivan.ma...@gmail.com] On Behalf Of helix84
Sent: Wednesday, September 05, 2012 1:18 PM
To: Calloni, Rodrigo
Cc: dspace-tech@lists.sourceforge.net
Subject: Re: [Dspace-tech] Enhancing DSpace thumbnail image resolution

On Wed, Sep 5, 2012 at 7:01 PM, Calloni, Rodrigo <rcall...@iadb.org> wrote:
> Thanks helix. I think I expressed myself in a wrong way.
>
> I think you got the idea of what I needed here:
>
> "An alternative to make a thumbnail look better (as opposed to increasing its 
> resolution) would be to use a better downsampling method. But I didn't 
> investigate if there are any other possibilities in the filter-media 
> framework."

If you want to investigate improving downsampling quality, in the mentioned 
BrandedPreviewJPEGFilter, this is where it takes place:

https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/app/mediafilter/BrandedPreviewJPEGFilter.java#L137

For starters, here's some pointers on how to change the sampling method:

http://stackoverflow.com/questions/4216123/how-to-scale-a-bufferedimage

If you find out that downsampling quality indeed can be improved, be sure to 
share it back with us!

One thing I'm not sure about is which filter is used when (I'd guess 
JPEGFilter, but BrandedPreviewJPEGFilter uses the 
webui.preview.maxwidth/maxheight properties), so you may want to figure that 
out, too.

> Anyway at this point we may see if by making the image larger and use CSS to 
> make it show small in some pages (results list) and bigger in others (full 
> view of item).

So you need both better quality and two thumbnail sizes?

Regards,
~~helix84
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to