Permalink
Browse files

Change trimmer to call GetImageBoundingBox, the way TrimImage works i…

…n 6.1.6.
  • Loading branch information...
1 parent cdbca48 commit bb661493e1e2aa5b419704f982e4b5f01a1444a9 rmagick committed Dec 17, 2004
Showing with 4 additions and 7 deletions.
  1. +4 −7 ext/RMagick/rmimage.c
View
@@ -1,4 +1,4 @@
-/* $Id: rmimage.c,v 1.86 2004/12/17 00:28:12 rmagick Exp $ */
+/* $Id: rmimage.c,v 1.87 2004/12/17 23:54:29 rmagick Exp $ */
/*============================================================================\
| Copyright (C) 2004 by Timothy P. Hunter
| Name: rmimage.c
@@ -7415,14 +7415,11 @@ trimmer(int bang, VALUE self)
Data_Get_Struct(self, Image, image);
- SetGeometry(image,&geometry);
- geometry.width = 0;
- geometry.height = 0;
- geometry.x = 0;
- geometry.y = 0;
-
GetExceptionInfo(&exception);
+ geometry = GetImageBoundingBox(image, &exception);
+ HANDLE_ERROR
+
new_image = CropImage(image, &geometry, &exception);
HANDLE_ERROR
HANDLE_ERROR_IMG(new_image)

0 comments on commit bb66149

Please sign in to comment.