summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorpajoye <none@none>2008-03-14 21:45:12 +0000
committerpajoye <none@none>2008-03-14 21:45:12 +0000
commitdea4bed17bf37e9132e0ed7634a73f8a77922de5 (patch)
treec268e70027bbdef80b165152e2233b414b967fcc /examples
parent421ff8387be75b0f706bddb3bcbec6409c94259f (diff)
downloadlibgd-dea4bed17bf37e9132e0ed7634a73f8a77922de5.tar.gz
- #136, update the threshold crop to use color distance in the rgb cube
(3d distance) and normalize the threshold level from 0..1.0
Diffstat (limited to 'examples')
-rw-r--r--examples/crop.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/examples/crop.c b/examples/crop.c
index f99f931..c72c641 100644
--- a/examples/crop.c
+++ b/examples/crop.c
@@ -58,19 +58,7 @@ int main()
return 1;
}
- im2 = gdImageThresholdCrop(im, 0xFFFFFF, 120);
- if (im2) {
- save_png(im2, "a3.png");
- gdImageDestroy(im2);
- }
- gdImageDestroy(im);
-
- im = read_png("test_crop_threshold.png");
- if (!im) {
- return 1;
- }
-
- im2 = gdImageThresholdCrop(im, 0xFFFFFF, 70);
+ im2 = gdImageThresholdCrop(im, 0xFFFFFF, 0.6);
if (im2) {
save_png(im2, "a4.png");
gdImageDestroy(im2);