diff --git a/checkin_notes b/checkin_notes index 4d281cac2c..2043d24c06 100755 --- a/checkin_notes +++ b/checkin_notes @@ -19372,6 +19372,7 @@ Bruce Allen 13 Nov 2004 - Fixed, modified, tested script to remove workunits. Linked to main ops page. - Fixed links at bottom of workunits page, showing outcomes of results. - Added tabular description of tables to the database form page, longer clause box + - Added fix (commented out) to get pictures for systems without TrueColor support (GD v 2) html/ops/ cancel_wu.php (removed) cancel_wu_form.php @@ -19380,3 +19381,4 @@ Bruce Allen 13 Nov 2004 db_form.php html/inc/ db_ops.inc + profile.inc diff --git a/html/inc/profile.inc b/html/inc/profile.inc index 7dd684a4ad..04af4ea906 100644 --- a/html/inc/profile.inc +++ b/html/inc/profile.inc @@ -318,9 +318,15 @@ function scale_image($image, $origWidth, $origHeight, $targetWidth, $targetHeigh $destHeight = $origHeight; } +if (1) { + // If you are using a modern PHP/GD installation that does 'truecolor' images, this is what's needed. $newImage = ImageCreateTrueColor($destWidth, $destHeight); - ImageCopyResampled($newImage, $image, 0, 0, 0, 0, $destWidth, $destHeight, $origWidth, $origHeight); +} else { + // If not, use this block. The image quality is lower but it works using older PHP/GD versions. + $newImage = ImageCreate($destWidth, $destHeight); + ImageCopyResized($newImage, $image, 0, 0, 0, 0, $destWidth, $destHeight, $origWidth, $origHeight); +} return $newImage; }