Skip to content

Commit

Permalink
Change trimmer to call GetImageBoundingBox, the way TrimImage works i…
Browse files Browse the repository at this point in the history
…n 6.1.6.
  • Loading branch information
rmagick committed Dec 17, 2004
1 parent cdbca48 commit bb66149
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions ext/RMagick/rmimage.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit bb66149

Please sign in to comment.