Thumbnail Size

After you have edited the source code, post your patch here.
Forum rules
Home | Wiki | Rules

Thumbnail Size

Postby ffagaras » 08 Jan 2012 18:03

Hello.
I've notice that thumbnail size is not correlated with the setting stored in Settings.Library.ThumbSize. The thumb size is hard-coded in
file Shareaza.h :
Code: Select all
...
#define THUMB_STORE_SIZE   128            // Thumbnail dimensions (128x128 px)
....

If you change the value in Settings.Library.ThumbSize the Library also change the size of the preview area but the picture size remains set to THUMB_STORE_SIZE. I think that is not correct and frustrating so I propose the necessary changes as follow :
File ThumbCache.cpp:
Code: Select all
BOOL CThumbCache::Cache(LPCTSTR pszPath, CImageFile* pImage, BOOL bLoadFromFile)
{
.....
   // Resample to desired size
   //old code
   //if ( ! pImage->FitTo( THUMB_STORE_SIZE, THUMB_STORE_SIZE ) )
   if ( ! pImage->FitTo( (int)Settings.Library.ThumbSize, (int)Settings.Library.ThumbSize) )
      return FALSE;
.....

}

and also I've change the default size value from 128 to 256 px because the preview picture is small and you can't distinguish what contains if you have higher
screen resolution.

File Settings.cpp :
Code: Select all
void CSettings::Load()
{
.....
//Add( _T("Library"), _T("ThumbSize"), &Library.ThumbSize, 128, 1, 16, 256, _T(" px") );
Add( _T("Library"), _T("ThumbSize"), &Library.ThumbSize, 256, 1, 16, 256, _T(" px") );
.....
}


Thank you.
ffagaras
 
Posts: 1
Joined: 08 Jan 2012 17:35

Return to Code Submission

Who is online

Users browsing this forum: No registered users and 1 guest

cron