diff options
| author | Nick Palmer <nick@sluggardy.net> | 2007-02-16 17:09:00 +0000 |
|---|---|---|
| committer | Nick Palmer <nick@sluggardy.net> | 2007-02-16 17:09:00 +0000 |
| commit | e5302406013d472458d7eab03e66863e9d07b26d (patch) | |
| tree | 15d7d7f03b6ce2930f9250d9ef8524a34bb67f78 /plugins/storage.bitfile.php | |
| parent | 059a19e95493de0a89f273607931bb9f9f639882 (diff) | |
| download | liberty-e5302406013d472458d7eab03e66863e9d07b26d.tar.gz liberty-e5302406013d472458d7eab03e66863e9d07b26d.tar.bz2 liberty-e5302406013d472458d7eab03e66863e9d07b26d.zip | |
Changes to allow PNG thumbnailing and to preserve transparency with gd when possible.
Diffstat (limited to 'plugins/storage.bitfile.php')
| -rw-r--r-- | plugins/storage.bitfile.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/storage.bitfile.php b/plugins/storage.bitfile.php index 6c9b419..ffb6b85 100644 --- a/plugins/storage.bitfile.php +++ b/plugins/storage.bitfile.php @@ -1,6 +1,6 @@ <?php /** - * @version $Revision: 1.18 $ + * @version $Revision: 1.19 $ * @package liberty * @subpackage plugins_storage */ @@ -71,7 +71,12 @@ function bit_files_load( $pRow ) { WHERE a.`foreign_id` = ? AND a.`content_id` = ?"; if( $ret = $gBitSystem->mDb->getRow($query, array( $pRow['foreign_id'], $pRow['content_id'] )) ) { $canThumbFunc = liberty_get_function( 'can_thumbnail' ); - if ( file_exists( BIT_ROOT_PATH.dirname( $ret['storage_path'] ).'/small.jpg' ) ) { + if ( file_exists( BIT_ROOT_PATH.dirname( $ret['storage_path'] ).'/small.png' ) ) { + $ret['thumbnail_url']['avatar'] = BIT_ROOT_URL.dirname( $ret['storage_path'] ).'/avatar.png'; + $ret['thumbnail_url']['small'] = BIT_ROOT_URL.dirname( $ret['storage_path'] ).'/small.png'; + $ret['thumbnail_url']['medium'] = BIT_ROOT_URL.dirname( $ret['storage_path'] ).'/medium.png'; + $ret['thumbnail_url']['large'] = BIT_ROOT_URL.dirname( $ret['storage_path'] ).'/large.png'; + } elseif ( file_exists( BIT_ROOT_PATH.dirname( $ret['storage_path'] ).'/small.jpg' ) ) { $ret['thumbnail_url']['avatar'] = BIT_ROOT_URL.dirname( $ret['storage_path'] ).'/avatar.jpg'; $ret['thumbnail_url']['small'] = BIT_ROOT_URL.dirname( $ret['storage_path'] ).'/small.jpg'; $ret['thumbnail_url']['medium'] = BIT_ROOT_URL.dirname( $ret['storage_path'] ).'/medium.jpg'; |
