Skip to content
Browse files

testing dithering

git-svn-id: http://opus.winelibrary.com/highlite@32 b2180d9d-0f15-4909-a4fa-37428cf2907f
  • Loading branch information...
1 parent 0d1a4a5 commit f68c0cb46b7e77341f636ddd823af2201090ac4e kastner committed Feb 11, 2008
Showing with 3 additions and 3 deletions.
  1. +3 −3 make_selection_ajax.php
View
6 make_selection_ajax.php
@@ -46,9 +46,6 @@
$image = imagecreatefrompng($image);
}
-// dither the image down to suggested # of colors
-imagetruecolortopalette($image, true, $num_colors);
-
// calculate the width (1:2 the original)
$new_width = $width;
$new_height = ceil(($new_width / $image_width) * $image_height / 2);
@@ -59,6 +56,9 @@
// squish (or stretch) the image into the new image object
imagecopyresized($image2, $image, 0, 0, 0, 0, $new_width, $new_height, $image_width, $image_height);
+// dither the image down to suggested # of colors
+imagetruecolortopalette($image2, true, $num_colors);
+
// pad the text if needed
$text = preg_replace("/\n|\t+/", " ", $text);
$new_text = $text;

0 comments on commit f68c0cb

Please sign in to comment.
Something went wrong with that request. Please try again.